You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2009/07/02 22:53:44 UTC
Re: complex OR query not working
: I want to execute the following query:
: (spacegroupID:g*) OR (!userID:g*).
First: "!" is not a negation operator in the lucene/solr query parser....
: In above syntax (!userID:g*) gives results correctly.
...i don't think it's doing what you think it's doing.
second: boolean queries can't be purely negative. they need to select
something. the second clause of your main query is a boolean query with a
single negative clause.
try this instead...
spacegroupID:g* (*:* -userID:g*)
...that will match
any doc with a spacegroupId starting with the g character
OR: any doc, except those with userID starting with the g character
-Hoss