lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <>
Subject Re: continue "ideo-logic" error in QueryParser and in BooleanQuery !
Date Mon, 17 Dec 2001 15:36:26 GMT

I do not think this is a bug.
You cannot make searches with queries that have only the NOT part.
You cannot ask Lucene to match all documents that do not contain a
certain term.  For instance, issuing a 'NOT pretty' will not return
doc1, doc3, doc4.
You have to use that NOT pretty in combination with something else
(AND).  For instance 'love AND NOT pretty' should return doc1.

I was about to say that you can check what other search engines do when
you give them just the negation, so I tried and 
AltaVista does return a bunch of matches, but Google doesn't let you
enter such a query.


--- "Serge A. Redchuk" <> wrote:
> ......
>   Let we have 4 docs:
>   doc1: "Love is life"
>   doc2: "Java is pretty nice language"
>   doc3: "C++ is powerful, but unsafe"
>   doc4: "Onion and love sometimes are not compatoble"
>   So, if search for "love OR NOT onion"
> Here I was wrong:  (nevertheless it not solve described bug)
>   result must be: doc1, doc2, doc3.
> must be:
>   result must be: doc1, doc2, doc3, doc4.  (ALL)
> .....
> Certainly I understand that people will not compose such complex
> queries to search for ALL,
> but lucene still do not finds all.
> --
> To unsubscribe, e-mail:  
> <>
> For additional commands, e-mail:
> <>

Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at
or bid at

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message