Reputation: 18521
I am using facet.prefix for auto complete.
This is my definition
<requestHandler name="/ac" class="solr.SearchHandler">
<lst name="defaults">
<str name="echoParams">explicit</str>
...
<str name="lowercaseOperators">true</str>
<str name="facet">on</str>
<str name="facet.field">Suggest</str>
</lst>
this is my field
<field name="Suggest" type="text_auto" indexed="true" stored="true" required="false" multiValued="true"/>
and
<fieldType class="solr.TextField" name="text_auto">
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
all works fine but when I search using caps lock it doesn't return answers.
Even when the field contains capitals letters - it doesn't.
I assume that the field in solr is lowered (from the field type filter definition) but the search term is not.
How can I control the search term caps/no caps?
Thanks.
Upvotes: 2
Views: 2241
Reputation: 52779
Facet works on the indexed terms and facet.prefix does not undergo analysis.
So as the suggest has the lowercasefilter, all the indexed terms are lower cased.
However, facet.prefix does not undergo lowercase and hence would not find any match on the indexed terms.
You would need to lowercase the terms passed with facet.prefix at the client side.
Upvotes: 2