I’ve noticed that the current sorting algorithms prioritize posts based on votes, which can sometimes lead to posts with high votes but few comments dominating the feed. This may not accurately reflect user engagement. On the other hand, sorting by “Most Comments” disregards votes entirely. I believe Lemmy should consider taking into account multiple user engagement metrics in their algorithms like comments, votes, time spent on a post, etc. What are your thoughts on this? Would you prefer a new sorting algorithm that combines various metrics, adjustments to existing algorithms to include more metrics, or do you like the current sorting algorithms available the way they are?

  • The_Lemmington_Post@discuss.onlineOP
    link
    fedilink
    arrow-up
    5
    ·
    8 months ago

    This is not possible because sorting is done in the database, so adding a new sort option requires a database migration with new indexes, columns and updated queries. Not something that can be done with a simple plugin.

    @[email protected] in https://github.com/LemmyNet/lemmy/issues/3936#issuecomment-1738847763

    An alternative approach could involve utilizing an API endpoint that provides metadata for recent posts, allowing users to implement custom sorting logic on their client side using JavaScript. This API endpoint is currently accessible only to moderators and administrators

    There is already such an API endpoint which is available for mods and admins.

    @[email protected] in https://lemmy.ml/comment/9159963

    • muntedcrocodile@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      8 months ago

      Why does sorting need to be in the db?

      Wven still we can probably acheive a decent customisation partually customisable sorts

      Say we only care about upvotes, downvotes, comments, timefactor

      Say we break it down so u can set a custom weighting for each of these eg 0, .25, .5, .1 then make a sort for all combinations thats only 4^4 = 256 combinations its a lot but seems within the real of possibility we still avoid needing to custom sort for each user.

      • The_Lemmington_Post@discuss.onlineOP
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        8 months ago

        The number of sorting algorithms needs to be much more limited than that; otherwise, it puts too much load on the server calculating all those combinations. It’s important to strike a balance between customization and system performance to ensure smooth operation and optimal user experience.

      • fmstrat@lemmy.nowsci.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        8 months ago

        Caching. As an example, an all feed and it’s associated indexes gets cached in the DB’s memory, allowing it to keep pace with thousands of users. And there are millions of posts on a server, sorting has to be done in the DB or the volume of meta in memory would be astounding.