• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Question: What is username:sorted used for?

Scheduled Pinned Locked Moved Solved Technical Support
3 Posts 2 Posters 96 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    uplift
    wrote on last edited by
    #1

    Not sure if this is right category so move to better one if needed.

    I was wondering what username:sorted collection is used for? It doesnt appear to be used in the codebase except when adding/removing to/from the sorted set. Also when adding the score of the set its always set to 0 so wont be sorted as I understand it.

    1 Reply Last reply
    0
  • barisB Offline
    barisB Offline
    <baris> NodeBB
    wrote on last edited by
    #2

    It is used for searching users by username, https://github.com/NodeBB/NodeBB/blob/master/src/user/search.js#L80.

    Since all the scores are 0 the order is lexicographic.

    1 Reply Last reply
    0
  • U uplift has marked this topic as solved on
  • U Offline
    U Offline
    uplift
    wrote on last edited by
    #3

    Ah that makes sense, didnt think to look in plugins. Cheers for the reply!

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development