lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <DOR...@il.ibm.com>
Subject Re: MultiFieldQueryParser.parse deprecated. What can I use?
Date Wed, 26 Jul 2006 22:07:52 GMT
By the resulted query toString(), boolean query would not work correctly:

qtxt:  a foo
[1]  Multi Field Query (OR) : (title:a body:a) (title:foo body:foo)
[2]  Multi Field Query (AND): +(title:a body:a) +(title:foo body:foo)
[3]  Boolean Query          : (title:a title:foo) (body:a body:foo)
--> By a chance, all are equivalent, returning doc1.

qtxt:  a -foo
[1]  Multi Field Query (OR) : (title:a body:a) -(title:foo body:foo)
[2]  Multi Field Query (AND): +(title:a body:a) -(title:foo body:foo)
[3]  Boolean Query          : (title:a -title:foo) (body:a -body:foo)
--> Here [1,2] "correctly" return no docs, but [3] returns doc1.

qtxt:  +a +foo
[1]  Multi Field Query (OR) : +(title:a body:a) +(title:foo body:foo)
[2]  Multi Field Query (AND): +(title:a body:a) +(title:foo body:foo)
[3]  Boolean Query          : (+title:a +title:foo) (+body:a +body:foo)
--> Now [1,2] "correctly" return doc1, but [3] returns no docs.

qtxt:  a +foo
[1]  Multi Field Query (OR) : (title:a body:a) +(title:foo body:foo)
[2]  Multi Field Query (AND): +(title:a body:a) +(title:foo body:foo)
[3]  Boolean Query          : (title:a +title:foo) (body:a +body:foo)
--> All "correctly" return doc1.

- Doron

Daniel Noll <daniel@nuix.com.au> wrote on 25/07/2006 23:11:15:

> Marvin Humphrey wrote:
> > I believe that this will cause difficulties with prohibited terms.  Say

> > you have these two documents...
> >
> >     Doc 1:
> >        title: a
> >        body:  foo
> >     Doc 2:
> >        title: b
> >        body:  bar
>
> It's not just prohibited terms.  Happens for required terms too.  A
> search for "a AND foo" would return no hits there even though it's a hit.
>
> Daniel
>
>
> --
> Daniel Noll
>
> Nuix Pty Ltd
> Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
> Web: http://www.nuix.com.au/                        Fax: +61 2 9212 6902
>
> This message is intended only for the named recipient. If you are not
> the intended recipient you are notified that disclosing, copying,
> distributing or taking any action in reliance on the contents of this
> message or attachment is strictly prohibited.
>
> ---------------------------------------------------------------------
> 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
View raw message