Introducing Searchkick

Bootstrapping Search

Search is incredibly hard to do well. It can take a weeks of any developer’s time to set up and tune. After going through this at Instacart, we decided to open source our efforts to help others bootstrap their search.

Here’s what you get with Searchkick.

1. Works Out-of-the-Box

Searchkick handles:

  • stemming - tomatoes matches tomato
  • special characters - jalapeno matches jalapeño
  • extra whitespace - dishwasher matches dish washer
  • misspellings - zuchini matches zucchini
  • custom synonyms - qtip matches cotton swab

Searchkick packages some standard Elasticsearch token filters to accomplish this, including snowball, shingle, and synonym.

2. Self-Improving Searches

Searchkick uses conversion data to learn what your users are looking for. If a user searches for “ice cream” and adds Ben & Jerry’s Chunky Monkey to the cart (the conversion metric), that item gets a little more weight for similar searches. Results get better as more people search.

Here’s how the converted search result position (mean) changed over the past 12 weeks.

3. Zero Downtime Re-Indexing

Searchkick allows you to re-index your documents without any downtime. Queries are run against the products_production index, which an is alias. When you reindex, Searchkick creates a new index suffixed with the current time - products_production_20130730120000. Once the index is built, it’s aliased to products_production in one atomic operation.

4. Query Like SQL

Query like SQL so there’s no need to learn a new query language.

Product.search "2% Milk", where: {in_stock: true}, limit: 10

What’s next?

We’d like Searchkick to work with any language, since much of the project is Elasticsearch configuration.

Also, we’d like to prepopulate synonyms from WordNet so scallion matches green onion out of the box.

Give your users an incredible search experience.

View on Github

Acknowledgements

30 July 2013 - Andrew Kane