lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arun Rangarajan <arunrangara...@gmail.com>
Subject AND query not working on stopwords as expected
Date Mon, 16 Feb 2015 21:32:05 GMT
Solr version 4.2.1

In my schema, I have "text" type defined as follows:
---
    <fieldType name="text" class="solr.TextField"
positionIncrementGap="100">

      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" words="stopwords.txt"
ignoreCase="true"/>
        <filter class="solr.WordDelimiterFilterFactory"
preserveOriginal="1" generateWordParts="1" generateNumberParts="1"
catenateWords="1" catenateNumbers="0" catenateAll="1"
splitOnCaseChange="1"/>
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
        <filter class="solr.ASCIIFoldingFilterFactory"/>
      </analyzer>

      <analyzer type="query">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.StopFilterFactory" words="stopwords.txt"
ignoreCase="true"/>
        <filter class="solr.WordDelimiterFilterFactory"
preserveOriginal="1" generateWordParts="1" generateNumberParts="1"
catenateWords="0" catenateNumbers="0" catenateAll="0"
splitOnCaseChange="0"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
        <filter class="solr.ASCIIFoldingFilterFactory"/>
      </analyzer>

    </fieldType>
---

Field "name" is of type "text".

I have another multi-valued int field called "all_class_ids".

Both fields are indexed. I have 'of' in stopwords.txt file.

I am using lucene query parser.

This query
q=name:of&rows=0
gives no results as expected.

However, this query:
q=name:of AND all_class_ids:(371)&rows=0
gives results and is equal to the same number of results as
q=all_class_ids:(371)&rows=0

This is happening only for stopwords. Why?

Thanks.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message