lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jenny Brown <skyw...@gmail.com>
Subject operator precedence and confusing result
Date Fri, 06 Mar 2009 17:53:24 GMT
I have Lucene running against a fairly large set of documents, and a
user interface for full text querying.  All queries mentioned below go
against the document full text.

I have one query from a user that is giving me bizarre behavior.  Its
structure is:

A)   medicine AND (cat OR dog OR horse OR fish)     =  10,000 results
B)   medicine AND cat OR dog OR horse OR fish        = 4,000 results
C)  (medicine AND cat) OR dog OR horse OR fish     = 90,000 results
(which tells me this isn't how B is interpretted)


This is backwards from what I would expect, as I would guess that case
B would bind (medicine AND cat) OR dog... etc., thus resulting in
-more- hits than A, rather than less.  Can someone explain what Lucene
is doing for case B?

I'm using StandardAnalyzer and a typically tokenized document text
field, and BooleanQuery.  Thanks for ideas and help.


Jenny Brown

Mime
View raw message