lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: AutoComplete Feature in Solr
Date Tue, 13 Oct 2015 01:21:47 GMT
Some of the links you're looking at are quite old, and a lot has
changed, assuming you're on a recent Solr version. It's usually best
to look at the Solr reference guide, see:
https://cwiki.apache.org/confluence/display/solr/Suggester

This might also help:
http://lucidworks.com/blog/2015/03/04/solr-suggester/

Best,
Erick


On Mon, Oct 12, 2015 at 1:24 PM, Salman Ansari <salman.rahmat@gmail.com> wrote:
> Hi,
>
> I have been trying to get the autocomplete feature in Solr working with no
> luck up to now. First I read that "suggest component" is the recommended
> way as in the below article (and this is the exact functionality I am
> looking for, which is to autocomplete multiple words)
> http://blog.trifork.com/2012/02/15/different-ways-to-make-auto-suggestions-with-solr/
>
> Then I tried implementing suggest as described in the following articles in
> this order
> 1) https://wiki.apache.org/solr/Suggester#SearchHandler_configuration
> 2) http://solr.pl/en/2010/11/15/solr-and-autocomplete-part-2/  (I
> implemented suggesting phrases)
> 3)
> http://stackoverflow.com/questions/18132819/how-to-have-solr-autocomplete-on-whole-phrase-when-query-contains-multiple-terms
>
> With no luck, after implementing each article when I run my query as
> http://[MySolr]:8983/solr/entityStore114/suggest?spellcheck.q=Barack
>
>
>
> I get
> <response>
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">0</int>
> </lst>
> </response>
>
>  Although I have an entry for Barack Obama in my index. I am posting my
> Solr configuration as well
>
> <searchComponent name="suggest" class="solr.SpellCheckComponent">
>  <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.FSTLookup</str>
>   <str name="field">entity_autocomplete</str>
> <str name="buildOnCommit">true</str>
>  </lst>
> </searchComponent>
>
>  <requestHandler name="/suggest"
> class="org.apache.solr.handler.component.SearchHandler">
>  <lst name="defaults">
>   <str name="spellcheck">true</str>
>   <str name="spellcheck.dictionary">suggest</str>
>   <str name="spellcheck.count">10</str>
> <str name="spellcheck.onlyMorePopular">true</str>
>         <str name="spellcheck.collate">false</str>
>  </lst>
>  <arr name="components">
>   <str>suggest</str>
>  </arr>
> </requestHandler>
>
> It looks like a very simple job, but even after following so many articles,
> I could not get it right. Any comment will be appreciated!
>
> Regards,
> Salman

Mime
View raw message