lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ku3ia <>
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"
    <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" />

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
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"?


View this message in context:
Sent from the Solr - User mailing list archive at

View raw message