Preferences

7 points
1 comment ReclusiveCoder
Many developers default to Elasticsearch or Solr for search—but for small to medium apps, that’s often overkill. Postgres has had full-text search built in for years, and with Supabase you can query it directly in SQL.

I wrote a short guide showing how to set it up and get blazing-fast search without extra infrastructure:

https://dev.to/reclusivecoder/skip-elasticsearch-build-blazing-fast-full-text-search-right-in-supabase-58pf

Would love to hear if others are using Postgres full-text search in production, and at what point/scale you'd rather switch to Elasticsearch.


sandreas
ElasticSearch is a known term and good for marketing purposes. So in enterprise context it is hard to Argument against it despite having a very specific use case.

Other projects claiming ElasticSearch API compatibility just don't work that good (e.g. zincsearch). Using plain lucene is also not that easy because the defaults are way less intuitive (e.g searching for terms with dashes, like click-bait).

Unfortunately DB fulltext indexes (mysql, SQL server, Oracle and PostgreSQL) tend to get HUGE over time and if there is anything you're trying to prevent it is filling the fast expensive database SSDs.

However, if you're just starting out, I'd recommend having a look at Meilisearch[1], with is way LEDs Resource hungry compared to elastic and offers similar features.

1: https://www.meilisearch.com

This item has no comments currently.