I see that the docs say that the doc needs to be indexed only, but for
Fuzzy or Analyzed, I think the field needs to be stored. On the other side,
not sure how much sense it makes to use any of those two implementations if
the field type you want to have is "string".

Tomás

On Thu, Jan 22, 2015 at 8:14 AM, Charles Sanders <csand...@redhat.com>
wrote:

> 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":[]}}}}
>

Reply via email to