

The underlying framework is a “sidecar” Lucene index separate from your main index. “Many beers and much coffee” was mentioned as I remember. The blogs linked at the end of this article will give you some insight into the process of coding these. The underlying suggester implementation builds these things called FSTs, or Finite State Transducers. AnalyzingInfix suggesters can make suggestions where suggest.q is something from the middle of the field.FST-based suggesters typically operate on the beginnings of fields, although you can remove stopwords.The major distinction between the two styles of a suggester implementation is: It’s worth repeating that these suggesters suggest whole fields as suggestions for query terms! This is radically different than term-based suggestions that consider terms in isolation. What you do care about is that the two approaches give significantly different results. The suggester implementation you select has significant implications for what is suggested and how it is built. Each has a different suggester implementation. There are two different “styles” of suggester I’ll touch on now, FST-based suggesters and AnalyzingInfix suggesters. There were a number of tricks we could utilize to make it seem like it was suggesting in a more context-sensitive way, all of which took effort and produced results that were of varying quality.

The approaches Apache Solr has used in the past usually centered around terms considered in isolation. The idea is that based on partial input, suggestions for query terms typed so far are returned, think “type ahead”. How We Used to Make Suggestions:Īutosuggest has been around in various more or less sophisticated forms for a while. In fact, if you throw > 32K fields at these, they error out. The implication here, of course, is that by and large these are not suitable for large text fields. This is much different than term-based suggestions because the user sees coherent suggestions for query terms from documents in your index. The huge difference with these suggesters is that they return the whole field where the input is found!. At the end of this post are links to several backgrounders that are interesting to me at least. Along about Solr 4.7 or so support made its way into Solr so you could configure these in solrconfig.xml. There’s been a new suggester in town for a while, thanks to some incredible work by some of the Lucene committers. More on these suggester implementations later. One note, the first two above are from an FST-based suggester, and the second two are are from an AnalyzingInfix suggester.
Updated support suggester how to#
This blog is about how to configure the suggesters to get this kind of response, and also talk about some of the “gotchas” that exist. The Solr/Lucene suggester component can make this happen quickly enough to satisfy very demanding situations. How would you like to have your user type “energy”, and see suggestions like:
