Well, I'm running LucidWorks 2.9.1 which contains Solr 4.8. 

I initially was working with the Solr documentation: 
http://archive.apache.org/dist/lucene/solr/ref-guide/apache-solr-ref-guide-4.8.pdf
 
However, you will notice on page 228, under the section "Suggester", it gives 
an example of a suggester search component using solr.SpellCheckComponet. 

Then our support rep at LucidWorks said we should use the documentation found 
here: 
https://cwiki.apache.org/confluence/display/solr/Suggester 

This documentation is for Solr 5.0, however, you will notice the statement: 
"Solr has long had the autosuggest functionality, but Solr 4.7 introduced a new 
approach based on a dedicated SuggestComponent . " 

So it would appear the solr.SuggestComponent has been around since 4.7, but the 
documentation has not caught up with the changes. Which is the source of a 
little confusion. 

Nevertheless, I had hoped to find a simple working example that I could use as 
a starting point to get the solr.SuggestComponent working so that I might play 
around with it and make it do what I want. The suggester appears to have many 
parameters and options, of which, several contain little or no explanation. 

No problem. I will just have to invest a little more time to unravel how the 
component works and how I can best use it. 

Thanks for your reply. 


----- Original Message -----

From: "Chris Hostetter" <hossman_luc...@fucit.org> 
To: solr-user@lucene.apache.org 
Sent: Thursday, January 22, 2015 12:50:46 PM 
Subject: Re: Suggester Example In Documentation Not Working 


1) which version of Solr are you using? (note that the online HTML ref 
guide is a DRARFT that applies to 5.0 - you may want to review the 
specific released version of the ref guide that applies to your version of 
solr: http://archive.apache.org/dist/lucene/solr/ref-guide/ 

2) the behavior of the suggester is very specific to the contents of the 
dictionary built -- the examples on that page apply to the example docs 
included with solr -- hence the techproduct data, and the example queries 
for input like "elec" suggesting "electronics" 

no where on that page is an example using the query "kern" -- wether or 
not that input would return a suggestion is going to be entirely dependent 
on wether the dictionary you built contains any similar terms to suggest. 

if you can please post more details about your documents -- ideally a full 
set of all the documents in your index (using a small test index of 
course) that may help to understand the results you are getting. 



: Date: Thu, 22 Jan 2015 11:14:43 -0500 (EST) 
: From: Charles Sanders <csand...@redhat.com> 
: Reply-To: solr-user@lucene.apache.org 
: To: solr-user@lucene.apache.org 
: Subject: Suggester Example In Documentation Not Working 
: 
: Attempting to follow the documentation found here: 
: https://cwiki.apache.org/confluence/display/solr/Suggester 
: 
: The example given in the documentation is not working. See below my 
configuration. I only changed the field names to those in my schema. Can anyone 
provide an example for this component that actually works? 
: 
: <searchComponent name="suggest" class="solr.SuggestComponent"> 
: <lst name="suggester"> 
: <str name="name">mySuggester</str> 
: <str name="lookupImpl">FuzzyLookupFactory</str> 
: <str name="dictionaryImpl">DocumentDictionaryFactory</str> 
: <str name="field">sugg_allText</str> 
: <str name="weightField">suggestWeight</str> 
: <str name="suggestAnalyzerFieldType">string</str> 
: </lst> 
: </searchComponent> 
: 
: <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy"> 
: <lst name="defaults"> 
: <str name="suggest">true</str> 
: <str name="suggest.count">10</str> 
: <str name="suggest.build">true</str> 
: </lst> 
: <arr name="components"> 
: <str>suggest</str> 
: </arr> 
: </requestHandler> 
: 
: <field name="sugg_allText" type="string" indexed="true" multiValued="true" 
stored="false"/> 
: <field name="suggestWeight" type="long" indexed="true" stored="true" 
default="1" /> 
: 
: 
: 
http://localhost:8888/solr/collection1/suggest?suggest=true&suggest.build=true&suggest.dictionary=mySuggester&wt=json&suggest.q=kern
 
: 
: 
{"responseHeader":{"status":0,"QTime":4},"command":"build","suggest":{"mySuggester":{"kern":{"numFound":0,"suggestions":[]}}}}
 
: 

-Hoss 
http://www.lucidworks.com/ 

Reply via email to