lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Grouping Clauses to Preserve Order of Boolean Precedence
Date Thu, 04 Aug 2011 01:05:09 GMT

: Thanks Ian. How would you achieve the logic of the below query using
: BooleanQuery and BooleanClause.occur? How would you achieve the grouping
: effect?
: 
: (Marketing AND Smith) OR Davies

The same way the query parser does: that's a BooleanQuery (A) with two 
"SHOULD" clauses, the first of which is a nested BooleanQuery (B) (with 
two "MUST" clauses (X child of B) Marketing, and (Y child of B) Smith), 
and the 2nd of which (C, child of A) is a query for Davies.


-Hoss

---------------------------------------------------------------------
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