Have you seen this? I tried to make something end-to-end with assorted
"gotchas" identified....

 Best,
Erick

On Wed, May 6, 2015 at 3:09 PM, O. Olson <olson_...@yahoo.it> wrote:
> Thank you Rajesh. I think I got a bit of help from the answer at:
> http://stackoverflow.com/a/29743945
>
> While that example sort of worked for me, I'm not had the time to test what
> works and what didn't.
>
> So far I have found that I need the the field in my searchComponent to be of
> type 'string'. In my original example I had this as text_general. Next I
> used the suggest_string fieldType as defined in the StackOverflow answer. I
> also removed your queryConverter, and it still works, so I think it's not
> needed.
>
> Thank you very much,
> O. O.
>
>
>
> Rajesh Hazari wrote
>> I just tested your config with my schema and it worked.
>>
>> my config :
>>
>> <searchComponent class="solr.SpellCheckComponent" name="suggest1">
>>
>> <lst name="spellchecker">
>>
>> <str name="name">
>> suggest
>> </str>
>>
>> <str name="classname">
>> org.apache.solr.spelling.suggest.Suggester
>> </str>
>>
>> <str
>> name="lookupImpl">
>> org.apache.solr.spelling.suggest.fst.AnalyzingInfixLookupFactory
>> </str>
>>
>> <str name="field">
>> textSuggest
>> </str>
>>
>> <float name="threshold">
>> 0.005
>> </float>
>>
>> <str name="buildOnCommit">
>> true
>> </str>
>>
>> <str name="suggestAnalyzerFieldType">
>> text_general
>> </str>
>>
>> <bool name="exactMatchFirst">
>> true
>> </bool>
>>
>> </lst>
>>
>> </searchComponent>
>>
>> <queryConverter name="queryConverter"
>> class="org.apache.solr.spelling.SuggestQueryConverter"/>
>>
>> <requestHandler class="org.apache.solr.handler.component.SearchHandler"
>> name="/suggest1">
>>
>> <lst name="defaults">
>>
>> <str name="spellcheck">
>> true
>> </str>
>>
>> <str name="spellcheck.dictionary">
>> suggest
>> </str>
>>
>> <str name="spellcheck.onlyMorePopular">
>> true
>> </str>
>>
>> <str name="spellcheck.count">
>> 5
>> </str>
>>
>> <str name="spellcheck.collate">
>> true
>> </str>
>>
>> </lst>
>>
>> <arr name="components">
>>
>> <str>
>> suggest1
>> </str>
>>
>> </arr>
>>
>> </requestHandler>
>>
>> http://localhost:8585/solr/collection1/suggest1?q=apple&rows=10&wt=json&indent=true
>>
>> {
>>   "responseHeader":{
>>     "status":0,
>>     "QTime":2},
>>   "spellcheck":{
>>     "suggestions":[
>>       "apple",{
>>         "numFound":5,
>>         "startOffset":0,
>>         "endOffset":5,
>>         "suggestion":["
> *
>> apple
> *
>> ",
>>           "
> *
>> apple
> *
>>  and",
>>           "
> *
>> apple
> *
>>  and facebook",
>>           "
> *
>> apple
> *
>>  and facebook learn",
>>           "
> *
>> apple
> *
>>  and facebook learn from"]},
>>       "collation","
> *
>> apple
> *
>> "]}}
>>
>>
>>
>> *Rajesh**.*
>
>
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Trying-to-get-AnalyzingInfixSuggester-to-work-in-Solr-tp4204163p4204222.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to