Hi all, I build Query objects programmatically. I do this by getting a TermQuery/PhraseQuery/whatever for each term in the user query, make a BooleanClause by specifying isRequired and isProhibited depending on whether the term has an "and" or an "or" or an "or not" etc prefixed before it (I use 1.4.3, which is why I use isRequired, isProhibited instead of BooleanClause.OCCUR). I combine all the BooleanClauses in the end to get my final Query.
This is working fine, except for one case where I ORed two complementary queries, i.e. I searched for "name:xyz or -name:xyz". Both of these queries independently produce results but both joined together don't. The isRequired parameter is false for both the parts of the query, while isProhibited is true for the second and false for the first. Shouldn't this query return all the documents which have some value of the field "name"? Thanks, Venu --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]