lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SK R" <rsk....@gmail.com>
Subject Re: how ungrouped query handled?
Date Fri, 23 Mar 2007 06:48:15 GMT
Thanks for your reply and this useful links.

On 3/23/07, Chris Hostetter <hossman_lucene@fucit.org> wrote:
>
>
> see also the FAQ "Why am I getting no hits / incorrect hits?" which points
> to...
>
> http://wiki.apache.org/lucene-java/BooleanQuerySyntax
>
> ...I've just added some more words of wisdom there from past emails.
>
>
> : Date: Thu, 22 Mar 2007 09:51:15 -0400
> : From: Erick Erickson <erickerickson@gmail.com>
> : Reply-To: java-user@lucene.apache.org
> : To: java-user@lucene.apache.org
> : Subject: Re: how ungrouped query handled?
> :
> : This is a pretty common issue that I've been grappling with by chance
> : recently. The main point is that the parser is NOT a boolean logic
> : parser.....
> :
> : Search the mail archive for the thread "bad query parser bug" and
> : you'll find a good discussion.
> :
> : I tried using PrecedenceQueryParser, but that didn't work for
> : me very well, search the mail archive on that and you'll see some
> : examples of why.
> :
> : I solved this problem for my immediate issues by writing a very
> : quick-and-dirty parenthesizer for my raw query. If it wasn't going
> : on summer, I might see if I can contribute something by
> : seeing if there's a way I can see to fix PrecedenceQueryParser.
> :
> : Best
> : Erick
> :
> : On 3/22/07, SK R <rsk.sen@gmail.com> wrote:
> : >
> : > Hi,
> : >      Can anyone explain how lucene handles the belowed query?
> : >     My query is *field1:source AND (field2:name OR field3:dest)* .
> I've
> : > given this string to queryparser and then searched by using searcher.
> It
> : > returns correct results. It's query.toString() print is ::
> +field1:source
> : > +(field2:name field3:dest)
> : >     But if i don't group my terms (i.e) my query : *field1:source AND
> : > field2:name OR field3:dest *,then it gives the result of  first two
> term's
> : > search result. It doesn't search 3rd term. It's query.toString() print
> is
> : > ::
> : > +field1:source +field2:name field3:dest.
> : > If i use same boolean operator between all terms, then it returns
> correct
> : > results.
> : > Why it doesn't search the terms after 2nd term if grouping not used?
> : >
> : > Thanks & Regards
> : > RSK
> : >
> :
>
>
>
> -Hoss
>
>
> ---------------------------------------------------------------------
> 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