Do you have to remove the documents which satisfies the both conditions? If
so use AND.

you have used OR, so if the first condition is satisfied , it will not
consider the second condition at all.

try using fq for both the condition, fq=(spacegroupID:g*) fq=(!userID:g*).


-----Original Message-----
From: Ashish P [mailto:ashish.ping...@gmail.com] 
Sent: Tuesday, June 30, 2009 4:10 PM
To: solr-user@lucene.apache.org
Subject: complex OR query not working


I want to execute the following query:
(spacegroupID:g*) OR (!userID:g*).
What I want to do here is select all docs where spacegroupID is starts with
'g' or selects docs where userId not start with 'g'.
In above syntax  (!userID:g*) gives results correctly.
Also (spacegroupID:g*)  gives results correctly.
But after adding OR the results are not correct, they seem to be like from
result of (spacegroupID:g*) remove the results of userID:g*.

Any idea on how to achieve the goal.
Thanks,
Ashish
--
View this message in context:
http://www.nabble.com/complex-OR-query-not-working-tp24269684p24269684.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to