Hi Mitch,

I have defined my field like:

    <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <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="1"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.SnowballPorterFilterFactory" language="English" 
protected="protwords.txt"/>
      </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"
                enablePositionIncrements="true"
                />
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" 
generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" 
splitOnCaseChange="1"/>
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
    </fieldType>

I have indexed two documents with "working" and "worked" values and when I 
search for "working" it is not giving me any results, whereas when I search for 
"work" it is giving me two results.

What should I be doing to get the query results for "working".

regards,
Naga

-----Original Message-----
From: Naga Darbha [mailto:ndar...@opentext.com] 
Sent: Monday, April 19, 2010 2:45 PM
To: solr-user@lucene.apache.org
Subject: RE: Stemming - disable at query time - reg.

Thank you Mitch! I will try that.

regards,
Naga



-----Original Message-----
From: MitchK [mailto:mitc...@web.de] 
Sent: Monday, April 19, 2010 2:35 PM
To: solr-user@lucene.apache.org
Subject: Re: Stemming - disable at query time - reg.


Naga,

1) Yes, it is possible. 
<fieldType name="myText" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
          ....
          <filter class="solr.SnowballPorterFilterFactory"
language="English" protected="protwords.txt"/> 
          ....
       </analyzer>
      <analyzer type="query">
         ... define those filters which you want to apply at query-time 
      </analyzer>
</fieldType>

2) I am not sure whether I understand your question right:
You do not need to copyField your myText-field, if it is okay for you that
the indexed data of the myText-field is stemmed and the query is not.
For example: if the original data consists of the sentence "I am working"
than it (maybe) looks like this after it is stemmed "I am work". If you
query against this with the term "working" there will be no match, if you
don't stem your querystring, too.

Hope this helps.

- Mitch
-- 
View this message in context: 
http://n3.nabble.com/Stemming-disable-at-query-time-reg-tp729152p729171.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to