lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raf <r.ventag...@gmail.com>
Subject Re: Basic searching doubt
Date Sat, 31 Oct 2009 09:40:57 GMT
If you search "A B" (with quotes) it is correct, but if you search only A B
(without quotes) it is not correct, because, by default the query parser
creates "OR" queries.
So searching   A B  you will find all documents that contains A or B, while
searching only A or only B you will normally find less documents!
If you want to search all documents that contains A and B, you should write
the query as +A +B (or change the default operator for query parser from OR
to AND).

Bye
Raf

On Sat, Oct 31, 2009 at 5:58 AM, Hrishikesh Agashe <
hrishikesh_agashe@persistent.co.in> wrote:

> Hi,
>
> If I search for string "A B" (i.e. A followed by a space followed by B) and
> I get 20 hits, then is it correct to expect that if I search for "A" (i.e.
> only A), I will get at least 20 hit or more? Similarly for if I search for
> B, I will get 20 hits or more?
>
> --Hrishi
>
> DISCLAIMER
> ==========
> This e-mail may contain privileged and confidential information which is
> the property of Persistent Systems Ltd. It is intended only for the use of
> the individual or entity to which it is addressed. If you are not the
> intended recipient, you are not authorized to read, retain, copy, print,
> distribute or use this message. If you have received this communication in
> error, please notify the sender and delete all copies of this message.
> Persistent Systems Ltd. does not accept any liability for virus infected
> mails.
>

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