3 comments

[ 0.24 ms ] story [ 17.4 ms ] thread
Hey there,

Great post. 10 days ago, I've posted a link (https://news.ycombinator.com/item?id=6476003) demonstrating how I was able to crawl, index and plug auto-complete on HN posts in less than 2 hours using Algolia Search as a Service API (rails + JS client). The main differences between ES and Algolia for this use-case are about the way prefix matching is handled and the way highlighting is done.

To provide auto-completion (prefix matching), whereas ES use ngrams and tokenization tricks to index all word prefixes, Algolia's data structures have a built-in feature enabling to match the prefixes of a word without doing such recipe at indexing time. As a consequence, your indexes will be smaller and your service faster :) Moreover, with Algolia, using such prefix matching algorithm provide outstanding highlighting capability. In fact, the index knows exactly which word matched (whereas ES knows that a specific "fake" ngram matched, but it's complex to highlight the original words with it), even handling typos.

We compared ES and Algolia for a basic "record/database search" use-case in our last blog post: blog.algolia.com/full-text-search-in-your-database-algolia-versus-elasticsearch/.

Feel free to contact me if you have any question.

Sylvain

What are the benefits of searchkick over tire?
Searchkick uses Tire under the hood, but provides a higher level api. Also, Tire is getting retired in favor of elasticsearch-ruby, so Searchkick could switch the backend and you wouldn't have to change your code.