Thanks for the reply Erick. I'm looking for type-ahead support; using
spell checking too via the DirectSolrSpellChecker. Seems like the
spell check based suggester is designed for type-head or am I not
understanding something? Here's my config:

    <requestHandler
class="org.apache.solr.handler.component.SearchHandler"
name="/suggest">
        <lst name="defaults">
            <str name="echoParams">explicit</str>
            <str name="wt">json</str>
            <str name="indent">true</str>
            <str name="df">suggest</str>
            <str name="spellcheck">true</str>
            <str name="spellcheck.dictionary">suggestDictionary</str>
            <str name="spellcheck.onlyMorePopular">true</str>
            <str name="spellcheck.count">5</str>
            <str name="spellcheck.collate">false</str>
        </lst>
        <arr name="components">
            <str>suggest</str>
        </arr>
    </requestHandler>

    <searchComponent class="solr.SpellCheckComponent" name="suggest">
        <lst name="spellchecker">
            <str name="name">suggestDictionary</str>
            <str
name="classname">org.apache.solr.spelling.suggest.Suggester</str>
            <str
name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookup</str>
            <str name="field">suggest</str>
            <float name="threshold">0.</float>
            <str name="buildOnCommit">true</str>
        </lst>
    </searchComponent>

I was confused why this approach was needed because using terms
component is so easy and doesn't require any "build" step. From your
answer, it seems like either approach is valid in Solr 4.4 but the
spellcheck based suggester has more knobs, such as loading in an
external dictionary in addition to data in my index, etc.

Cheers,
Tim


On Wed, Jul 31, 2013 at 5:08 AM, Erick Erickson <erickerick...@gmail.com> wrote:
> The biggest thing is that the spellchecker has lots of knobs
> to tune, all the stuff in
> http://wiki.apache.org/solr/SpellCheckComponent#spellcheck.collate
>
> TermsComponent, on the other hand, just gives you
> what's in the index with essentially no knobs to tune.
>
> So it depends on your goal. Typeahead or spelling
> correction? In the first case I'd go for TermsComponent
> and the second spell check as an example.
>
> Best
> Erick
>
> On Tue, Jul 30, 2013 at 2:07 PM, Timothy Potter <thelabd...@gmail.com> wrote:
>> Going over the comments in SOLR-1316, I seemed to have lost the
>> forrest for the trees. What is the benefit of using the spellcheck
>> based suggester over something like the terms component to get
>> suggestions as the user types?
>>
>> Maybe it is faster because it builds the in-memory data structure on
>> commit? Seems like the terms component is pretty fast too.
>>
>> I'd appreciate any additional insights about this. There are so many
>> "solutions" to auto-suggest for Solr, it's hard to decide what
>> approach to take.
>>
>> Cheers,
>> Tim

Reply via email to