Posts tagged wildcard
Solr 3.5 – Wildcard search as SQL LIKE
111 years ago
by Pieter Vogelaar
in Solr
The Solr schema.xml has by default the “string” fieldType.
<fieldType name="string" class="solr.StrField" sortMissingLast="true" />
Add the following fieldType to your schema.xml and use it as field type for your field:
<fieldType name="string_rev" class="solr.TextField" sortMissingLast="true">
<analyzer type="index">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.PatternReplaceFilterFactory" pattern="(\s+)" replacement="" replace="all" />
<filter class="solr.ReversedWildcardFilterFactory" />