DEV Community

Jared Silver
Jared Silver

Posted on

What do you use for full-text search these days?

Hi folks!

I'm currently researching various options for a full-text search implementation. I'm building it for a Rails app using Postgres, but I'm also curious in general: what are you using for full-text search these days?

Thanks a bunch!

Top comments (11)

Collapse
 
zaksh profile image
Zohaib Sharani

You can look into Elasticsearch, this Full-Text Search in Rails Using Elasticsearch article might help you.

Collapse
 
kspeakman profile image
Kasey Speakman

Depends on needs and operations budget. With my targeted application and small team, we use Postgres full text search. At the time it felt like a fallback choice compared to a dedicated search database. But since it has been in production, we have found it to suit our needs well. This excellent post has a section of full text search.

If we had a mass-audience or content-heavy app and more resources available, we might choose a more in-depth searching solution like elastic or solr.

Collapse
 
pauloxnet profile image
Paolo Melchiorre

Hi Jared!

I used some famous solutions in past projects and after some test in our last project we started using the PostgreSQL Full-Text Search.

I presented a talk at last EuroPython conference about how we started using PostgreSQL Full-Text with Python and Django:
speakerdeck.com/pauloxnet/full-tex...

I suggest you to do some test with it because you already have PostgreSQL on your stack and you don't need other external software to have this functionality.

Searching for my project I found a lot of interesting resource related to Rails:
google.it/search?q=full+text+searc...

Bye,
Paolo

Collapse
 
sephcoster profile image
Seph Coster

If you want to do the indexing yourself and customize query returns, suggesters (for typahead), etc for your app I've had good luck with Elasticsearch. Simple setup process, and clients for the all kinds of languages. Scales with the app, so you can start running it on the same box and locally in your dev environment and expand to a cluster if you see uptake. In general, it's nice to have something that's totally accessible via the API at all levels and I've enjoyed the community and the docs.

Once your data is in the index and you've got text searching down, the aggregation abilities can be useful really quickly and sometimes unexpectedly, and they are pretty much "free" for the ones you use most often from a query perspective. "Can we show X in the app in a performant way?" Um... :: checks docs for aggregation * :: "Wow, yeah, we can."

Collapse
 
jozefmaxted profile image
Jozef Maxted πŸ‘»

Can highly recommend Algolia too. Super easy to to setup, and performance is amazing. Only downside is that it can get quite pricey.

Collapse
 
lukaszkuczynski profile image
lukaszkuczynski

Elasticsearch! Focuses on it and does it perfectly! It's so easy to integrate with beats.. Look here, ma.
lukcreates.pl/software-engineering...

Collapse
 
thebouv profile image
Anthony Bouvier

Apache Solr. Love it.

Collapse
 
mrm8488 profile image
Manuel Romero

Apache SOLR or Elasticsearch

Collapse
 
ben profile image
Ben Halpern

Full-text search for general purposes, like internal and querying or for user-centric UX concerns?

Collapse
 
jaredsilver profile image
Jared Silver

Either one! :)

I'm actually building for both at the moment.

Collapse
 
ben profile image
Ben Halpern

We use Algolia which is a hosted, super low-latency search index and I think it's really well-done. And for some internal search, where performance and other tuning isn't as critical, we use Postgres' native full-text search, as it's the easiest to work with internally, test, etc. as opposed to Solr/ElasticSearch etc. in my book, but it's probably not what you'd want your end user using.

And I can't say I definitely recommend Algolia for all use-cases, but I'm happy with how we're using it. We have a very fast search if I do say so myself :)