Solr - prefix query
1 answer
you are probably using text analysis for your address field that splits the word into multiple tokens.
In this case, the word "banana-solar" can be divided into several tokens (bananas, solar or). Hence, searching for s * will return you the result.
If you don't want to split, define a new field type using the KeywordTokenizerFactory and other filters. eg
<fieldType name="text_string" class="solr.TextField" sortMissingLast="true" omitNorms="true">
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory" />
</analyzer>
</fieldType>
+4
source to share