Domanda

I am not able to do exact name search for some of the words in my database. As in when I search for "Aimee", "Aime" fetches some results but no results with full word "Aimee". It's strangely behaving for some of the words.

I have Solr4 configured with these analyzers in schema.xml:

<fieldType name="text" class="solr.TextField" omitNorms="false">
    <analyzer>
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.StandardFilterFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.PorterStemFilterFactory"/>
        <filter class="solr.NGramFilterFactory" minGramSize="2" maxGramSize="15"/>
    </analyzer>
    <analyzer type="query">
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.StandardFilterFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
</fieldType>
È stato utile?

Soluzione

Stem filter was causing this problem. i removed stem filter from analyzer and it worked.

Altri suggerimenti

Could be "Aimee" is being stemmed. So try and add <filter class="solr.PorterStemFilterFactory"/> to <analyzer type="query">

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top