2

I have lost the synonym for fruit as i gave SEABISCUIT,SEA,BISCUIT and BISCUIT is giving same result as SEABISCUIT as the synonym i used for them is "," .Please help me . Is there any other way to get the same result for SEABISCUIT and SEA BISCUIT. Without loosing the results for BISCUIT.

Iam using websphere 7 and where solr is added as seperate tool.

PLEASE HELP ME !!!

My schema.xml is as below

<fieldType name="text" class="solr.TextField"
            positionIncrementGap="100">
            <analyzer type="index">
                <tokenizer class="solr.KeywordTokenizerFactory" />
                <filter class="solr.StopFilterFactory" ignoreCase="true"
                    words="stopwords.txt" enablePositionIncrements="true" />
                <filter class="solr.WordDelimiterFilterFactory"
                    generateWordParts="1" generateNumberParts="1" catenateWords="1"
                    catenateNumbers="1" catenateAll="0" splitOnCaseChange="0" />
                <filter class="solr.LowerCaseFilterFactory" />
                <filter class="solr.SnowballPorterFilterFactory" language="English"
                    protected="protwords.txt" />

                <filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="25" />
            </analyzer>
            <analyzer type="query">
                <tokenizer class="solr.KeywordTokenizerFactory" />
                <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
                    ignoreCase="true" expand="true" />
                <filter class="solr.StopFilterFactory" ignoreCase="true"
                    words="stopwords.txt" enablePositionIncrements="true" />
                <filter class="solr.WordDelimiterFilterFactory"
                    generateWordParts="1" generateNumberParts="1" catenateWords="0"
                    catenateNumbers="0" catenateAll="0" splitOnCaseChange="0" />
                <filter class="solr.LowerCaseFilterFactory" />
                <filter class="solr.SnowballPorterFilterFactory" language="English"
                    protected="protwords.txt" />

                <filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="25" />
            </analyzer>
        </fieldType>

1 Answers1

0

You have SynonymFilterFactory at the Query time. Try putting it at the indexing time. There is a known issue with multi-word synonyms (see the in-depth explanation) and query-time expansions. This is slowly getting improved, but still not perfect.

Alexandre Rafalovitch
  • 9,709
  • 1
  • 24
  • 27