Im using the solr engine to an e-commerce website I have store the search tags as a sting in a single field as below, I need to get convert that field to case insensitive.I tried to apply the lowercase filter factory and it goes not work for the field
<field name="tags" type="string" multiValued="true" indexed="true" stored="true"/>
<fieldType name="string" class="solr.StrField" sortMissingLast="true" docValues="true"/>
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
Sample of the field
"tags":["Property",
"House",
"Land",
"Home",
"House For Sale",
"Property For Sale",
"Land For Sale",
"Prime property for sale",
"Prime property for sale in Colombo 03"],
You have defined your field as
StrField
. String fields can't have analysis chains attached. You have to change it to aTextField
:However, I'd recommend using a different name than
string
for the field, since thestring
field type is expected to work in a particular way (such as when used forid
fields, etc.). Instead, use something describing what it does, such asstring_caseinsensitive
.