lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
Subject Re: solr.StopFilterFactory doesn't work with wildcard
Date Wed, 24 Apr 2013 14:35:37 GMT
Well, what is happening is that the query parser detects a "prefix query" 
("series*") and then does a term analysis on the prefix alone ("series"), 
which you probably have in your stop words list, which causes the analyzer 
to return... nothing, which is what the error is complaining about.

You can workaround my querying for serie* (as long as "serie" is not also a 
stop word.

In any case, technically, the stop filter is doing exactly what it is 
supposed to do.

In all honesty, I can't imagine a context in which a noun such as "series" 
would be on a stop word list. What's your thinking on why it is there??

-- Jack Krupansky

-----Original Message----- 
From: Dmitry Baranov
Sent: Wednesday, April 24, 2013 9:43 AM
To: solr-user@lucene.apache.org
Subject: solr.StopFilterFactory doesn't work with wildcard

Good day!

I have a problem with the solr.StopFilterFactory and wildcard text search.
For query like this 'hp* pavilion* series* d4*', where 'series' is stop
word, I recieve error:
'analyzer returned no terms for multiTerm term: series'
But for query like this 'hp* pavilion* series d4*', I recieve expected
results.

Could you help me?

I have field type for search as below:

<fieldType name="search_string" class="solr.TextField"
positionIncrementGap="100">
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory" />
<filter class="solr.StopFilterFactory" words="stopwords.txt"
ignoreCase="true"/>
</analyzer>
<analyzer type="multiterm">
<tokenizer class="solr.WhitespaceTokenizerFactory" />
<filter class="solr.StopFilterFactory" words="stopwords.txt"
ignoreCase="true"/>
</analyzer>
</fieldType>

Solr version:

solr-spec 4.0.0.2012.10.06.03.04.33
solr-impl 4.0.0 1394950 - rmuir - 2012-10-06 03:04:33
lucene-spec 4.0.0
lucene-impl 4.0.0 1394950 - rmuir - 2012-10-06 03:00:40



--
View this message in context: 
http://lucene.472066.n3.nabble.com/solr-StopFilterFactory-doesn-t-work-with-wildcard-tp4058581.html
Sent from the Solr - User mailing list archive at Nabble.com. 


Mime
View raw message