I think terms component is the recommended way.  That's how we have
implemented it and from the solr wiki page
http://wiki.apache.org/solr/TermsComponent:

... each term. This can be useful for doing auto-suggest or other
things that operate ...

Have to be careful how you filter the field during indexing though,
otherwise you can get weird suggestions based on latin roots (due to
stemming stuff) among other things.  We used something like:

      <analyzer>
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.WordDelimiterFilterFactory"
splitOnCaseChange="0" splitOnNumerics="0" stemEnglishPossessive="1"
generateWordParts="1" generateNumberParts="1" catenateWords="0"
catenateNumbers="0" catenateAll="0"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="facet_stopwords.txt"/>
        <filter class="solr.LengthFilterFactory" min="5" max="20" />
      </analyzer>

-Tim

On Fri, May 14, 2010 at 2:39 PM, Blargy <zman...@hotmail.com> wrote:
>
> What is the preferred way to implement this feature? Using facets or the
> terms component (or maybe something entirely different). Thanks in advance!
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Autosuggest-tp818430p818430.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to