lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Taylor" <>
Subject I have a question about phrase query with stop words
Date Fri, 13 Apr 2007 01:41:00 GMT
I found some discussions of this question from back in 2003, but that was
many updates ago.

I have built an index using the standard stop analyser which uses the
standard list of stop words.  "will" and :the" are stop words.

As I understand analyzers and phrase queries, when I search for

you will find the answer

using the default slop of 0, I should find any pattern like

you <any stop word> find <any stop word> answer

because the analyzer replaces "will" and "the" in the query with a space
indicator as it did when analyzing the original input text.  Instead, I find
phrases such as

you find an answer

"an" is a stop work, so matching "find an answer" is as expected, but there
is no stop word between "you" and "find" in the original input string.  I do
not see why "you find an answer" matches.

What am I doing wrong?

Also, when I try to highlight after searching for a phrase, the highlighter
highlights individual words wherever it finds them in the input text.  The
documentation suggests that if I use the right scoring system, I will
highlight only long strings of adjacent tokens which are found in the
phrase, but I am not sure how to do that.

If necessary, I will paste in samples of my code for creating the indexes
and doing the search.


Bill Taylor

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