Question

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>
Was it helpful?

Solution

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

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top