lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ku3ia <dem...@gmail.com>
Subject StopFilter:enablePositionIncrements question
Date Thu, 24 Apr 2014 20:14:33 GMT
Hi all! My question is not new in maillist, but I can't found a solution. I'm
using Solr 4.6.0. My text field definition is

<fieldType name="text" class="solr.TextField"
autoGeneratePhraseQueries="true">
  <analyzer>
    <tokenizer class="solr.ClassicTokenizerFactory"/>
    <filter class="solr.ClassicFilterFactory"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.KStemFilterFactory"/>
    <filter class="solr.TrimFilterFactory"/>
    <filter class="solr.StopFilterFactory" words="stopwords.txt"
ignoreCase="true" />
    <filter class="solr.LengthFilterFactory" min="2" max="50" />
  </analyzer>
</fieldType>

In SolrConfig – <luceneMatchVersion>LUCENE_46</luceneMatchVersion>

Via core/Documents I'm adding a document, ex, {"id":"1","title":"Need for
speed"}. Keyword "for" is in my stopwords.txt file, so in index will be two
terms: "need" and "speed".

Due to https://issues.apache.org/jira/browse/LUCENE-4963
enablePositionIncrements feature was deprecated, but simply changed by
default from "false" to "true" in StopWords filter.

My stopwords file contains keywords: and, or, for, then, such, etc.

When I'm searching phrase
"need for speed" it is ok, Solr returns my doc;
"need speed" – no match;
"need such speed" – returns a doc.

Does it normal, that when I change "for" to any keyword from stopwords list
– Solr returns a document, but when I omit "for" keyword in phrase – Solr
returns nothing?

Early, I used Solr 4.3 and I haven't any problems with this.

And a last question: how I need to change my config or schema files, to get
matches when searching phrase like "need speed"?

Thanks.




--
View this message in context: http://lucene.472066.n3.nabble.com/StopFilter-enablePositionIncrements-question-tp4132979.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message