Hi,
we implemented a Solr suggester (http://wiki.apache.org/solr/Suggester)
that uses a file based dictionary. We use the results of the suggester to
populate a dropdown field of a search field on a webpage.

Our dictionary (autosuggest.txt) contains:

foo
bar

Our suggester has the following behavior:

We can make a request with the search query "fo" and get a response with
the suggestion "foo". This is great.

However, if we make a request with the query "foo" (an exact match) we get
no suggestions. We would expect that the response returns the suggestion
"foo".

How can we configure the suggester to return also the perfect match as a
suggestion?

This is the config for our search component:

<searchComponent class="solr.SpellCheckComponent" name="suggest">
    <str name="queryAnalyzerFieldType">spellCheck</str>
    <lst name="spellchecker">
      <str name="name">default</str>
      <str name="classname">org.apache.solr.spelling.suggest.Suggester</str>
     <str name="sourceLocation">autosuggest.txt</str>
    </lst>
  </searchComponent>

Thanks for help!
Mirko

Reply via email to