solr : how to match singular and plural words -


i have below words in document 1) sweetings 2) masters

configuration text_general

<fieldtype name="text_general" class="solr.textfield" positionincrementgap="100">   <analyzer type="index">     <tokenizer class="solr.standardtokenizerfactory"/>     <filter class="solr.stopfilterfactory" ignorecase="true" words="stopwords.txt" />     <!-- in example, use synonyms @ query time     <filter class="solr.synonymfilterfactory" synonyms="index_synonyms.txt" ignorecase="true" expand="false"/>     -->     <filter class="solr.lowercasefilterfactory"/>    </analyzer>   <analyzer type="query">     <tokenizer class="solr.standardtokenizerfactory"/>     <filter class="solr.stopfilterfactory" ignorecase="true" words="stopwords.txt" />     <filter class="solr.synonymfilterfactory" synonyms="synonyms.txt" ignorecase="true" expand="true"/>     <filter class="solr.lowercasefilterfactory"/>    </analyzer> </fieldtype> 

how make sure if user searches 1) master matches masters 2) masters matches masters 3) sweetings matches sweetings

i used snowballporter , didn't work.

the field type text_general, can see quote, not include <filter class="solr.porterstemfilterfactory"/>. field typetext_en does, change field type , re-index data desired results.

if asking why , how other queries or text content analyzed in solr, recommend analysis screen solr admin gui.

you can go there, type in "masters" , field type, select text_en or text_general. see text_en , input "masters", token "master" not matched, "masters". however, analyzing text_general field , input "masters", both "masters" , "master" matched.


Comments