lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: QueryParser explicit and implicit search operator
Date Mon, 19 Feb 2007 13:45:17 GMT
<<<How else would you explain the 316 search results, when the results for
each single queries "Lucene" and "Query" is lesser than 316?>>>
Because some documents contain "Lucene" but not "Query" and vice-versa.

These results look perfectly reasonable to me too. The default operator is
AND, which is why queries 3 and 4 return the same results.

When you query on "Query" you get some number of documents (109 to be exact)
that ALSO contain "Lucene". The reverse is also true, when you query
"Lucene", 109 of those documents also contain "Query".

So, if you subtract 109 (look familiar?) from the sum of the individual
queries for Lucene and Query, you get 316 (155 + 270 - 109) which is exactly
what you get from "Lucene OR Query". All fine from my perspective.

Best
Erick

On 2/19/07, Karimi-Tabatabaie Jamal <Jamal.Karimi@cursor.de> wrote:
>
> Hello Erik,
>
> You are right for a little complex query. I tested  the following queries
>
> serach at lucenebool.com with query "Query" 155 results
> serach at lucenebool.com with query "Lucene" 270 results
> serach at lucenebool.com with query "Query AND Lucene" 109 results
> serach at lucenebool.com with query "Query Lucene" 109 results
> serach at lucenebool.com with query "Query OR Lucene" 316 results
>
> and came to the guess that it seems to be fixed for a query like "X OR Y"!
> How else would you explain the 316 search results, when the results for each
> single queries "Lucene" and "Query" is lesser than 316?
>
> Jamal
>
> -----Urspr√ľngliche Nachricht-----
> Von: Erik Hatcher [mailto:erik@ehatchersolutions.com]
> Gesendet: Samstag, 17. Februar 2007 06:27
> An: java-user@lucene.apache.org
> Betreff: Re: QueryParser explicit and implicit search operator
>
>
> On Feb 16, 2007, at 1:53 PM, Karimi-Tabatabaie Jamal wrote:
> > For my problem there seems to exist a lucence Bug
> > (http://issues.apache.org/jira/browse/LUCENE-167) but also it seems
> > that
> > it's solved in the Lucene integration on site http://
> > www.lucenebook.com.
>
> Where do you see the problem solved at lucenebook.com?   The "Query
> parsed to:" for this query <http://www.lucenebook.com/search?
> query=aaaaa+AND+bbbbb+OR+ccccc+AND+ddddd> is
>
>         Query parsed to: +aaaaa bbbbb +ccccc +ddddd
>
> The OR caused the "bbbbb" term to not be required, yet all other
> terms are required.
>
>         Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> 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