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 "Serge A. Redchuk" <bi...@mail.ru> on 2001/12/17 15:14:45 UTC

continue "ideo-logic" error in QueryParser and in BooleanQuery !

......
  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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: continue "ideo-logic" error in QueryParser and in BooleanQuery !

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

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 av.com and google.com. 
AltaVista does return a bunch of matches, but Google doesn't let you
enter such a query.

Otis


--- "Serge A. Redchuk" <bi...@mail.ru> 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:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>