lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "prabin meitei" <prabin.mei...@gmail.com>
Subject Re: Using AND with MultiFieldQueryParser
Date Thu, 13 Nov 2008 09:23:59 GMT
Hi,
>From whatever you have written you are trying to write a query
*word1 AND stopword AND word2
*this means that the result should contain all of word1, word2 and the
stopword.

Since you have already removed the stopword during index time you will never
find any document matching your query. (this is expected behaviour)
you can possibly use word1 OR stopword OR word2 (depends on what you want in
the result)
 If you can clarify more about what you want in the result we can discuss on
what can be done.

Prabin

On Thu, Nov 13, 2008 at 10:30 AM, Rafael Cunha de Almeida <
almeidaraf@gmail.com> wrote:

> Hello,
>
> I used an Analyzer which removes stopwords when indexing, then I wanted
> to do an AND search using MultiFieldQueryParser. So I did this:
>        word1 AND stopword AND word2
> I thought the stopword would be ignored by the searcher (I use the same
> Analyzer to index and search). But instead, I get no results whenever I
> have a stopword like that. If I remove the stopword, giving me:
>        word1 AND word2
> then the search is sucessful. Is that the expected behaviour? Am I
> doing something wrong?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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