On Tue, Nov 4, 2008 at 1:21 AM, Joe Pollard <[EMAIL PROTECTED]> wrote:
> I am trying to decide if this is a solr or a lucene problem, using solr
> 1.3:
>
> take this example --
>
> (-productName:"whatever") OR (anotherField:"Johnny")
>
> I would expect to get back records that have anotherField=Johnny, but
> also, any records that don't have 'whatever' as the productName.

Lucene can't really do pure negative queries... Solr currently only
allows negative queries at the top level... so the sub-query
(-productName:"whatever") matches nothing.  Try

(*:* -productName:"whatever") OR (anotherField:"Johnny")

-Yonik

Reply via email to