lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Satuluri, Venu_Madhav" <>
Subject Using NOT queries inside parentheses
Date Mon, 06 Mar 2006 18:08:49 GMT

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

This query works just as expected:
"alwaysTrueField:true -name:john"

i.e. it returns all those documents except those with name john.

Does lucene run a sub-query for each part of the query inside
parentheses, which is why the NOT query that is alone doesn't work? I am
using the following template for converting user queries into lucene
queries "alwaysTrueField:true +(<user query with a few modifications>)".
I need to put extra parentheses in order to retain the correctness of
the query. 

Any suggestions on how to work around this (buggy?) behaviour?

Many thanks,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message