I've indexed a rich-text documents with the following content:

This is a testing rich text documents to test the uploading of files to Solr


When I tried to use the suggestion, it return me the entire field in the
content once I enter suggest?q=t. However, when I tried to search for
q='rich', I don't get any results returned.

This is my current configuration for the suggester:
<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">Suggestion</str>
<str name="suggestAnalyzerFieldType">suggestType</str>
<str name="buildOnStartup">true</str>
<str name="buildOnCommit">false</str>
  </lst>
</searchComponent>

<requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy" >
  <lst name="defaults">
    <str name="wt">json</str>
        <str name="indent">true</str>

<str name="suggest">true</str>
<str name="suggest.count">10</str>
<str name="suggest.dictionary">mySuggester</str>
  </lst>
  <arr name="components">
<str>suggest</str>
  </arr>
</requestHandler>

Is it possible to allow the suggester to return something even from the
middle of the sentence, and also not to return the entire sentence if the
sentence. Perhaps it should just suggest the next 2 or 3 fields, and to
return more fields as the users type.

For example,
When user type 'this', it should return 'This is a testing'
When user type 'this is a testing', it should return 'This is a testing
rich text documents'.


Regards,
Edwin

Reply via email to