java - How to fix Solr serach result distortion in almost same queries? -


here solr field type


<fieldtype name="company_name" class="solr.textfield" positionincrementgap="100">       <analyzer type="index">           <tokenizer class="solr.standardtokenizerfactory"/>           <filter class="solr.stopfilterfactory" ignorecase="true" words="stopwords.txt" />           <filter class="solr.lowercasefilterfactory"/>       </analyzer>       <analyzer type="query">           <tokenizer class="solr.classictokenizerfactory"/>           <filter class="solr.stopfilterfactory" ignorecase="true" words="stopwords.txt" />           <filter class="solr.lowercasefilterfactory"/>       </analyzer>   </fieldtype> 

if need find documents in field company_name equal "abibas sports", queries fq=company_name:abibas sport , fq=company_name:abibas sports return different results. suitable case fq=company_name:abibas sport.

how can fix problem character s @ end of word. results must same in each case.


first query:

first query result


second query:

second query result

try using solr.porterstemfilterfactory

porter stemmer english language.

its normalization process removes common endings words.

example: "riding", "rides", "horses" ==> "ride", "ride", "hors". 

in case sports sport


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -