I have the following content in my Solr index: west indian cherry in type text_en (see field definition below).
Search cherr* with cherr* found.
Also the cherri* search matches the words in the document.
But the search for cherry* does not match.
I suspect PorterStemFilterFactory for this, but I don't understand why (the query parser is the same as the index parser).
Request example
/solr/select?defType=edismax&q=cherry*
solrconfig.xml
... <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.EnglishPossessiveFilterFactory"/> <filter class="solr.PorterStemFilterFactory"/> </analyzer> <analyzer type="query"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.EnglishPossessiveFilterFactory"/> <filter class="solr.PorterStemFilterFactory"/> </analyzer> </fieldType> ...
field analysis
Index
org.apache.solr.analysis.StandardTokenizerFactory: cherry org.apache.solr.analysis.LowerCaseFilterFactory: cherry org.apache.solr.analysis.EnglishPossessiveFilterFactory: cherry org.apache.solr.analysis.PorterStemFilterFactory: cherri <-- note the change from cherry to cherri
request
org.apache.solr.analysis.StandardTokenizerFactory: cherry org.apache.solr.analysis.LowerCaseFilterFactory: cherry org.apache.solr.analysis.EnglishPossessiveFilterFactory: cherry org.apache.solr.analysis.PorterStemFilterFactory: cherri
Matej source share