lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iboppana <indrani.bopp...@cmgdigital.com>
Subject Generic question on Query Analyzers
Date Thu, 27 May 2010 17:39:23 GMT

Hi to all,

I have a question on query analyzers.

How do we make sure that when searches for terms like A&M does not match
docs which have some thing like 5a.m etc 

On analysis in admin page, it looks like WordDelimiterFilterFactory, is
splitting on &, how can i make it work so that i can use features of word
delimiter as well make sure certain words like A&M, D&B etc does not split.

Below is my field definition

<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>        
        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
        <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="0"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
        <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="0"
catenateNumbers="0" catenateAll="0"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
    </fieldType>

Thanks in advance.

Indrani
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Generic-question-on-Query-Analyzers-tp849075p849075.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message