This may be helpful: http://lucidworks.com/blog/solr-suggester/
Note that there are a series of fixes in various versions of Solr, particularly buildOnStartup=false and working on multivalued fields. Best, Erick On Wed, Jun 3, 2015 at 8:04 PM, Zheng Lin Edwin Yeo <edwinye...@gmail.com> wrote: > My previous suggester configuration is derived from this page: > https://wiki.apache.org/solr/Suggester > > Does it mean that what is written there is outdated? > > Regards, > Edwin > > > > On 3 June 2015 at 23:44, Zheng Lin Edwin Yeo <edwinye...@gmail.com> wrote: > >> Thank you for your suggestions. >> Will try that out and update on the results again. >> >> Regards, >> Edwin >> >> >> On 3 June 2015 at 21:13, Alessandro Benedetti <benedetti.ale...@gmail.com> >> wrote: >> >>> I can see a lot of confusion in the configuration! >>> >>> Few suggestions : >>> - read carefully the document and try to apply the suggesting guidance >>> - currently there is no need to use spellcheck for suggestions, now they >>> are separated things >>> - i see text used to derive suggestions, I would prefer there to see the >>> copy field specifically used to contain the interesting fields >>> - Yes you need to build the suggester the first time to see suggestions >>> - Yes , if you add a copy field yo need to re-index to see it filled ! >>> >>> Cheers >>> >>> 2015-06-03 11:07 GMT+01:00 Zheng Lin Edwin Yeo <edwinye...@gmail.com>: >>> >>> > This is my suggester configuration: >>> > >>> > <searchComponent class="solr.SpellCheckComponent" name="suggest"> >>> > <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.tst.TSTLookupFactory</str> >>> > <str name="field">text</str> <!-- the indexed field to derive >>> > suggestions from --> >>> > <float name="threshold">0.005</float> >>> > <str name="buildOnCommit">true</str> >>> > </lst> >>> > </searchComponent> >>> > <requestHandler >>> class="org.apache.solr.handler.component.SearchHandler" >>> > name="/suggest"> >>> > <lst name="defaults"> >>> > <str name="echoParams">explicit</str> >>> > <str name="defType">edismax</str> >>> > <int name="rows">10</int> >>> > <str name="wt">json</str> >>> > <str name="indent">true</str> >>> > <str name="df">text</str> >>> > >>> > <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>suggest</str> >>> > </arr> >>> > </requestHandler> >>> > >>> > >>> > Yes, I've read the guide. I've found out that there is a need to do >>> > re-indexing if I'm creating a new copyField. It works when I used the >>> > copyField that's created before the indexing is done. >>> > >>> > As I'm using the spellcheck dictionary as my suggester, so does that >>> mean I >>> > just need to build the spellcheck dictionary? >>> > >>> > >>> > Regards, >>> > Edwin >>> > >>> > >>> > On 3 June 2015 at 17:36, Alessandro Benedetti < >>> benedetti.ale...@gmail.com> >>> > wrote: >>> > >>> > > Can you share you suggester configurations ? >>> > > Have you read the guide I linked ? >>> > > Has the suggestion index/fst has been built ? ( you need to build the >>> > > suggester) >>> > > >>> > > Cheers >>> > > >>> > > 2015-06-03 4:07 GMT+01:00 Zheng Lin Edwin Yeo <edwinye...@gmail.com>: >>> > > >>> > > > Thank you for your explanation. >>> > > > >>> > > > I'll not need to care where the suggestions are coming from. All the >>> > > > suggestions from different fields can be consolidate and display >>> > > together. >>> > > > >>> > > > I've tried to put those field into a new Suggestion copy field, but >>> no >>> > > > suggestion is shown when I set: >>> > > > <str name="field">Suggestion</str> <!-- the indexed field to derive >>> > > > suggestions from --> >>> > > > >>> > > > Is there a need to re-index the documents in order for this to work? >>> > > > >>> > > > Regards, >>> > > > Edwin >>> > > > >>> > > > >>> > > > >>> > > > On 2 June 2015 at 17:25, Alessandro Benedetti < >>> > > benedetti.ale...@gmail.com> >>> > > > wrote: >>> > > > >>> > > > > Hi Edwin, >>> > > > > I have worked extensively recently in Suggester and the blog I >>> feel >>> > to >>> > > > > suggest is Erick's one. >>> > > > > It's really detailed and good for a beginner and expert as well. >>> [1] >>> > > > > >>> > > > > Apart that let's see you particular use case : >>> > > > > >>> > > > > 1) Do you want to be able to get also where the suggestions are >>> > coming >>> > > > from >>> > > > > ? >>> > > > > e.g. >>> > > > > suggestion1 from field1 >>> > > > > suggestion2 from field2 ? >>> > > > > In this case I would try with multiple dictionaries but I am not >>> sure >>> > > > Solr >>> > > > > allows you to use them concurrently. >>> > > > > But can be a really nice extension to develop. >>> > > > > >>> > > > > 2) If you don't care where the suggestions are coming from, just >>> use >>> > a >>> > > > copy >>> > > > > field, where you copy the content of the interesting fields. >>> > > > > The suggestions will come from the fields you have copied in the >>> copy >>> > > > > field, without distinction. >>> > > > > >>> > > > > Hope this helps you >>> > > > > >>> > > > > Cheers >>> > > > > >>> > > > > >>> > > > > [1] http://lucidworks.com/blog/solr-suggester/ >>> > > > > >>> > > > > 2015-06-02 4:22 GMT+01:00 Zheng Lin Edwin Yeo < >>> edwinye...@gmail.com >>> > >: >>> > > > > >>> > > > > > Hi, >>> > > > > > >>> > > > > > Does anyone knows if we can derive suggestions across multiple >>> > > fields? >>> > > > > > >>> > > > > > I tried to set something like this in my field in suggest >>> > > > > searchComponents >>> > > > > > in solrconfig.xml, but nothing is returned. It only works when I >>> > set >>> > > a >>> > > > > > single field, and not multiple field. >>> > > > > > >>> > > > > > <searchComponent class="solr.SpellCheckComponent" >>> name="suggest"> >>> > > > > > <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.tst.TSTLookupFactory</str> >>> > > > > > <str name="field">Content, Summary</str> <!-- the indexed >>> field >>> > to >>> > > > > > derive suggestions from --> >>> > > > > > <float name="threshold">0.005</float> >>> > > > > > <str name="buildOnCommit">true</str> >>> > > > > > </lst> >>> > > > > > </searchComponent> >>> > > > > > >>> > > > > > I'm using solr 5.1. >>> > > > > > >>> > > > > > Regards, >>> > > > > > Edwin >>> > > > > > >>> > > > > >>> > > > > >>> > > > > >>> > > > > -- >>> > > > > -------------------------- >>> > > > > >>> > > > > Benedetti Alessandro >>> > > > > Visiting card : http://about.me/alessandro_benedetti >>> > > > > >>> > > > > "Tyger, tyger burning bright >>> > > > > In the forests of the night, >>> > > > > What immortal hand or eye >>> > > > > Could frame thy fearful symmetry?" >>> > > > > >>> > > > > William Blake - Songs of Experience -1794 England >>> > > > > >>> > > > >>> > > >>> > > >>> > > >>> > > -- >>> > > -------------------------- >>> > > >>> > > Benedetti Alessandro >>> > > Visiting card : http://about.me/alessandro_benedetti >>> > > >>> > > "Tyger, tyger burning bright >>> > > In the forests of the night, >>> > > What immortal hand or eye >>> > > Could frame thy fearful symmetry?" >>> > > >>> > > William Blake - Songs of Experience -1794 England >>> > > >>> > >>> >>> >>> >>> -- >>> -------------------------- >>> >>> Benedetti Alessandro >>> Visiting card : http://about.me/alessandro_benedetti >>> >>> "Tyger, tyger burning bright >>> In the forests of the night, >>> What immortal hand or eye >>> Could frame thy fearful symmetry?" >>> >>> William Blake - Songs of Experience -1794 England >>> >> >>