Elasticsearch/Opensearch

Elasticsearch is a flexible & scalable search engine, super efficient even with large pools of data. It works specially great with "text" search, which is what we have in Squarehub.

Opensearch is a open-source fork of Elasticsearch, so while they share the same origin they may not share the same goals in the future!

Here is a nice article detailing how it handles simple search queries:

Searchkick

In our Squarehub application, we use the Searchkick gem to simply the Elastic/Opensearch implementation.

On top of that, Searchkick is smart and allows users to make mistakes:

  • stemming - tomatoes matches tomato

  • special characters - jalapeno matches jalapeño

  • extra whitespace - dishwasher matches dish washer

  • misspellings - zuchini matches zucchini

  • custom synonyms - pop matches soda

This comes from their Github, which I strongly advice you to read to get a better grasp at Searchkick.

Re-indexing

When working with Elasticsearch, data often needs to be re-indexed to keep the search performant.

When do you need to re-index then? Well, if you've read their Github, you know already 😈

Last updated