9

I'm working on a proposal to rip out the existing PostgreSQL ILIKE/fuzzy_search based search in Lemmy (the federated Reddit clone) and replace it with Tantivy, a Rust full-text search library. The current implementation is basically WHERE title ILIKE '%query%' which obviously doesn't scale and has zero relevance ranking. The proposal adds BM25 scoring, phrase queries, boolean operators, field-specific searches (author:name), tag filtering, and date ranges - all while keeping the existing API endpoint unchanged. I'd need to maintain a separate Tantivy index on disk, hook into all CRUD operations to keep it in sync, and build a query parser that translates user input into Tantivy's query language. The alternative is just sticking with PostgreSQL's built-in full-text search (tsvector/tsquery) which would be way less work to implement but wouldn't give us the same level of advanced querying. Is rolling our own search index with Tantivy worth the complexity, or should we just use what Postgres already provides and call it a day?

you are viewing a single comment's thread
view the rest of the comments
[-] onlinepersona@programming.dev 1 points 22 hours ago

Make a PR or ask the devs. The search could be improved for sure.

this post was submitted on 14 Jul 2026
9 points (100.0% liked)

Programming

27709 readers
545 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS