I like field collapsing because that way my suggestions gives phrase results (ie the suggestion starts with what the user has typed so far) and thus I limit suggestions to be in the order of the words typed. I think that looks better for our retail oriented site. I populate the index with previous user queries. I just put wildcards on the end of the collapsed version what the user has typed so far. It is very fast. I make suggestions for every keystroke as a user types in his query on our site. Hope that helps.
-----Original Message----- From: Kai Schlamp [mailto:kai.schl...@googlemail.com] Sent: Sunday, March 13, 2011 11:14 PM To: solr-user@lucene.apache.org Subject: Different options for autocomplete/autosuggestion Hi. There seems to be several options for implementing an autocomplete/autosuggestions feature with Solr. I am trying to summarize those possibilities together with their advantages and disadvantages. It would be really nice to read some of your opinions. * Using N-Gram filter + text field query + available in stable 1.4.x + results can be boosted + sorted by best matches - may return duplicate results * Facets + available in stable 1.4.x + no duplicate entries - sorted by count - may need an extra N-Gram field for infix queries * Terms + available in stable 1.4.x + infix query by using regex in 3.x - only prefix query in 1.4.x - regexp may be slow (just a guess) * Suggestions ? Did not try that yet. Does it allow infix queries? * Field Collapsing + no duplications - only available in 4.x branch ? Does it work together with highlighting? That would be a big plus. What are your experiences regarding autocomplete/autosuggestion with Solr? Any additions, suggestions or corrections? What do you prefer? Kai