Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out character searching/metrics #5

Open
0x000011b opened this issue Jan 23, 2023 · 1 comment
Open

Figure out character searching/metrics #5

0x000011b opened this issue Jan 23, 2023 · 1 comment
Labels
planning Stuff we need to think about

Comments

@0x000011b
Copy link
Contributor

Obviously just showing characters sorted by creation date on the homepage is not ideal. Ideally we'd have them sorted by popularity and categories, or something of the sorts. Things to think about:

  • How will search work?
    • ElasticSearch is the usual go-to, but that's too heavy and bloated for our specific use case.
    • Consider whether simple PostgreSQL ILIKE queries will be enough, or whether we should look into lean ES alternatives like MeiliSearch, zinc or sonic.
  • How will popularity work?
    • "message count within last (X timeframe)" sounds good.
    • However, considering that the messages table (or whatever else we use to model them) will be the highest traffic table by far, doing a naive COUNT every time we want to build the homepage will likely cause us problems.
    • Idea: consider having an additional column on the characters table with an estimated interaction counter or something of the sorts, which can be updated via a background cron job that we can schedule depending on DB load. Index on this and use for sorting.
@0x000011b 0x000011b added the planning Stuff we need to think about label Jan 23, 2023
@0x000011b
Copy link
Contributor Author

Also, I've gotten requests for tags and searching for characters via tags too. Worth keeping in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
planning Stuff we need to think about
Projects
None yet
Development

No branches or pull requests

1 participant