lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ksurya <surya.work....@gmail.com>
Subject solr 3.4 do not want to apply synonym mapping term to search matching docs
Date Fri, 17 Aug 2018 13:35:10 GMT
Actual result:
   doc1 and doc2 

the second document is coming because the synonym term "uva" is matching
with doc2: Katrina Uva
Requirement:
We do not want to apply the synonym (uva) to bring the  doc2 (Katrina Uva)

The following is our solr setup version 3.4 analyzers 

/<fieldType name="typeahead" class="solr.TextField">
	<analyzer type="index">
		<tokenizer class="solr.WhitespaceTokenizerFactory"/>
		<filter class="solr.LowerCaseFilterFactory"/>
		<filter class="solr.ISOLatin1AccentFilterFactory"/>
              <filter class="solr.SynonymFilterFactory"
synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
		<filter class="solr.LowerCaseFilterFactory"/>		
		<filter class="solr.EdgeNGramFilterFactory" maxGramSize="100"
minGramSize="1"/>
              <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
	</analyzer>
	<analyzer type="query">
		<tokenizer class="solr.KeywordTokenizerFactory"/>
		<filter class="solr.LowerCaseFilterFactory"/>
		<filter class="solr.ISOLatin1AccentFilterFactory"/>
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
		<filter class="solr.PatternReplaceFilterFactory" pattern="^(.{20})(.*)?"
replacement="$1" replace="all"/>
              <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
	</analyzer>
    </fieldType>
/



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Mime
View raw message