Satuluri, Venu_Madhav wrote:
Hi,

The following query does not work as expected for me:
"alwaysTrueField:true (-name:john)"
neither does this:
"alwaysTrueField:true +(-name:john)"

It returns zero results, despite there being many documents without name
john. (alwaysTrueField is, needless to say, true for all documents).

If you want this to work, the most elegant way I've found is to override the getBooleanQuery(Vector) method in QueryParser and insert a MatchAllDocsQuery into the boolean query if every clause is prohibited.

Daniel


--
Daniel Noll

Nuix Australia Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia
Phone: (02) 9280 0699
Fax:   (02) 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to