I'd _strongly_ recommend you become familiar with the
admin>>(your core)>>analysis page. It tells you exactly
what each filter does to your input and makes it much
simpler to answer questions like this. Hover over each
of the gray letter pairs (e.g. "SF" will be gray, hover over
it and you'll see that that's the "StopFilter").

In this case WordDelimiterFilterFactory is breaking
on on all non alpha-numerics. Do note that when
you remove it, all the _other_ punctuation that it
strips will suddenly be relevant, i.e.
"my dog has fleas.", the period after "fleas" will
be part of that token so you'll have to deal with that.

Best,
Erick

On Wed, Jul 27, 2016 at 4:58 AM, nitin.garg88 <nitin.gar...@gmail.com> wrote:
> 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.

Reply via email to