I am trying to work on an autocomplete feature on Solr and the way I found how to do it, is to use Solr Suggester. However, it does not work as expected. If someone invokes http://localhost:8983/solr/techproducts/suggest?suggest=true&suggest.build=true&suggest.dictionary=mySuggester&wt=json&suggest.q=a
while the index has a field that starts with Apple
it will not come out. I have request with suggest.q=A
(with an upper case).
Is there a way to make Solr Suggester case-insensitive?
Here are my configurations:
<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">autocomp</str>
<str name="weightField">price</str>
<str name="suggestAnalyzerFieldType">string</str>
</lst>
</searchComponent>
Here are relevent parts of the schema:
<fieldType class="solr.TextField" name="textSuggest" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StandardFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
<field name="autocomp" type="textSuggest" indexed="true" stored="true" multiValued="true"/>
<copyField source="title" dest="autocomp"/>
Thanks