You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Morus Walter <mo...@tanto-xipolis.de> on 2004/01/20 15:30:49 UTC

QueryParser and stopwords

Hi,

I'm currently trying to get rid of query parser problems with stopwords
(depending on the query, there are ArrayIndexOutOfBoundsExceptions,
e.g. for stop AND nonstop where stop is a stopword and nonstop not).

While this isn't hard to fix (I'll enter a bug and patch in bugzilla), 
there's one issue left, I'm not sure how to deal with:

What should the query parser return for a query string containing only
stopwords?

And when I think about this, there's another one:
stop AND NOT nonstop
creates a boolean query, only containing prohibited terms, which
AFAIK cannot be used in a search. How to deal with this?

Currently it returns an empty BooleanQuery.
I think it would be more useful to return null in this case.

Morus

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: QueryParser and stopwords

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hello Morus,

--- Morus Walter <mo...@tanto-xipolis.de> wrote:
> Hi,
> 
> I'm currently trying to get rid of query parser problems with
> stopwords
> (depending on the query, there are ArrayIndexOutOfBoundsExceptions,
> e.g. for stop AND nonstop where stop is a stopword and nonstop not).
> 
> While this isn't hard to fix (I'll enter a bug and patch in
> bugzilla), 

There is already a bug report open for this.  A very old one, too!

> there's one issue left, I'm not sure how to deal with:

> What should the query parser return for a query string containing
> only stopwords?

null?

> And when I think about this, there's another one:
> stop AND NOT nonstop
> creates a boolean query, only containing prohibited terms, which
> AFAIK cannot be used in a search. How to deal with this?
> 
> Currently it returns an empty BooleanQuery.
> I think it would be more useful to return null in this case.

Either one should be okay.  null, to be consistent with above.

Looking forward to the patch for this OLD bug.
Otis


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org