Google like autosuggest with Solr

svenkubiak picture svenkubiak · Aug 6, 2010 · Viewed 23.5k times · Source

I'm currently using Solr with Terms Component and Jquery Autosuggest which works quiet good. However, this construct is limited to one autosuggest word (it autocompletes only the first word). Is it possible to implement a Google like autosuggest with multiple words/terms so i can autocomplete multiple words?

Answer

javanna picture javanna · Feb 16, 2012

I just wrote a blog post about different ways to make auto complete suggestions with Solr. It's basically a comparison of some different strategies, check it out, it might help. If you want to make multiple terms suggestions, it turns out you should use, as already mentioned in the other answer you got, the Suggester component available in Solr starting from the 3.1 version. Since it has some limitations, you can also have a look at the ShingleFilterFactory, which generates token NGrams. It creates combination of tokens as a single token, that's useful to suggest multiple words.