lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nitin.garg88" <nitin.gar...@gmail.com>
Subject How to configure solr while having Apostrophes in fields
Date Wed, 27 Jul 2016 11:58:24 GMT
When i search for "plato" it return me all records with
"plato,platos,plato's"
When i search for "platos" it return me all records with "platos,plato's"
When i search for "plato's" it return me all records with "platos,plato's"

Please suggest me how to configure schema.xml .Below is my "text" setting in
schema.xml

  <fieldType name="text" class="solr.TextField" positionIncrementGap="100"
autoGeneratePhraseQueries="true">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>

        
        <filter class="com.XX.solr.CJKFilterFactory" />

        
        <filter class="solr.SynonymFilterFactory" expand="false"
ignoreCase="true"
               
synonyms="${home}/solr-configuration/bibliographic-protected-synonyms.txt"/>

        
        <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1"
                catenateWords="1" catenateNumbers="1" catenateAll="0"
stemEnglishPossessive="0" splitOnCaseChange="0"
               
protected="${home}/solr-configuration/bibliographic-protwords.txt"/>

        
        <filter class="solr.StopFilterFactory" ignoreCase="true"
enablePositionIncrements="true"
               
words="${home}/solr-configuration/bibliographic-stopwords.txt"/>

        
        <filter class="solr.SynonymFilterFactory" expand="true"
ignoreCase="true"
               
synonyms="${home}/solr-configuration/bibliographic-synonyms.txt"/>

        
        <filter class="com.XX.solr.DiacriticsFilterFactory"
mappingFile="${home}/sort.map"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="com.XX.solr.CJKFilterFactory" />
        <filter class="solr.SynonymFilterFactory" expand="false"
ignoreCase="true"
               
synonyms="${home}/solr-configuration/bibliographic-protected-synonyms.txt"/>
        <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1"
                catenateWords="0" catenateNumbers="0" catenateAll="0"
stemEnglishPossessive="0" splitOnCaseChange="0"
               
protected="${home}/solr-configuration/bibliographic-protwords.txt" />
        <filter class="solr.StopFilterFactory" ignoreCase="true"
enablePositionIncrements="true"
               
words="${home}/solr-configuration/bibliographic-stopwords.txt"/>
        <filter class="solr.SynonymFilterFactory" expand="false"
ignoreCase="true"
               
synonyms="${home}/solr-configuration/bibliographic-synonyms.txt"/>
        <filter class="com.vtls.solr.DiacriticsFilterFactory"
mappingFile="${home}/sort.map"/>
      </analyzer>
    </fieldType>

Thanks in advance !




--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-configure-solr-while-having-Apostrophes-in-fields-tp4289196.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message