Reputation: 37
How do I do a search for the word suffix? I'm using Solr-4.5.1. Using Solr-3.6.2 I have noted in the schema.xml: filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="50" side="back" In solr-4.5.1 does not work. Thanks.
Upvotes: 3
Views: 1326
Reputation: 1978
This answer is not correct, there is only one result from a fieldType pipeline not two as is implied here. You will need to copy your source field into a second "backwards" field and also search upon it.
Upvotes: 1
Reputation: 14736
I think you have to use the ReverseStringFilterFactory
like this
<fieldType name="text" class="solr.TextField" omitNorms="false">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StandardFilterFactory"/>
<filter class="solr.WordDelimiterFilterFactory" catenateWords="1" catenateAll="1" preserveOriginal="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="15"/>
<filter class="solr.ReverseStringFilterFactory" />
<filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="15"/>
<filter class="solr.ReverseStringFilterFactory" />
</analyzer>
...
Upvotes: 5