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 subasta <ad...@subasta.pl> on 2008/11/11 11:06:38 UTC

Query two fields OR other AND

Hello,

I have problem with two fields. In query I am use q.op=AND but I would like
use in two first fields OR.
Example:

iTitle:(+keyword 1 +keyword2) OR iDescription:(+keyword 1
+keyword2)+iUser:"12345"+iType:"1"

This query not work :(

Please help. Sorry for my english.
-- 
View this message in context: http://www.nabble.com/Query-two-fields-OR-other-AND-tp20436548p20436548.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Query two fields OR other AND

Posted by Chris Hostetter <ho...@fucit.org>.
: I have problem with two fields. In query I am use q.op=AND but I would like
: use in two first fields OR.
: Example:
: 
: iTitle:(+keyword 1 +keyword2) OR iDescription:(+keyword 1
: +keyword2)+iUser:"12345"+iType:"1"
: 
: This query not work :(

someplaces in your query sting it seems like you are using "+" to indicate 
a mandatory term, but in the second line it looks like the "+" characters 
are URL escaped whitespace ... what does debugQUery=true show you for the 
parsed query?  does it match what you expect?

i would also strongly recomment that you don't mix/match the differnet 
syntaxes (AND/OR vs +/-) in a single query ... it will only confuse you 
... stick with q.op=OR and use +/- and things will make a lot more sense  
(since that's the most direct representation of hte underlying query 
classes)


-Hoss