Writing a space-ignoring autocompleter with ElasticSearch

Dave Dash
2 min readMar 12, 2015

If you followed the ElasticSearch Guide you can build a decent autocompleter. If you had an index of companies near you, typing “Pizza” would probably land you “Pizza Hut”, “Pizza My Heart”, “Pizza Express”, etc.

If you try to narrow those choices by typing in “Pizzah” and forget that oh-so-critical space, you’ll end up empty.

Let’s find out why by looking at the autocomplete analyzer:

--

--

Dave Dash

DadOps 24/7 and DevOps Consultant. Formerly @Pinterest and @Mozilla