OR operator in SolrQueryInList

370 views
Skip to first unread message

Daniel K. Rudolf

unread,
May 23, 2014, 8:44:05 AM5/23/14
to sol...@googlegroups.com
How can I add another variable ("sender") in my solr query:

SolrQueryInList queryInList = new SolrQueryInList("destination", result);

result is multiple value (e.g. A, B, C ...)

I have try this ...("destination OR sender", result") but this is not correct... 

Thanks for any ideas...

Daniel K. Rudolf

unread,
May 23, 2014, 8:54:46 AM5/23/14
to sol...@googlegroups.com
I forgot to explain what my result must be. My final result must be:

destination:A OR sender A OR destination:B OR sender B etc...


--
You received this message because you are subscribed to the Google Groups "SolrNet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to solrnet+u...@googlegroups.com.
To post to this group, send email to sol...@googlegroups.com.
Visit this group at http://groups.google.com/group/solrnet.
For more options, visit https://groups.google.com/d/optout.



--
Actual Group

Daniel K. Rudolf, mag. družb. inf.
Project coordinator

Ferrarska ulica 14, 6000 Koper - Slovenia

Mauricio Scheffer

unread,
May 26, 2014, 5:14:07 PM5/26/14
to sol...@googlegroups.com
new SolrQueryInList("destination", result) || new SolrQueryInList("sender", result)


--
Mauricio

Daniel K. Rudolf

unread,
May 26, 2014, 5:34:23 PM5/26/14
to sol...@googlegroups.com
Realy thanks for help, I have one more question

What stands for OR and what for AND operators for Solr?

Mauricio Scheffer

unread,
May 26, 2014, 5:47:40 PM5/26/14
to sol...@googlegroups.com
I don't understand the question. Do you mean to ask what the C# || operator does when applied to a SolrNet query object and then translated to a Solr query? It gets translated as "OR" in the query sent to Solr.




--
Mauricio

Daniel K. Rudolf

unread,
May 26, 2014, 5:52:20 PM5/26/14
to sol...@googlegroups.com
You understand correctly :D

so if you are saying in c#

OR is as ||

AND is as && (i think it is)

Mauricio Scheffer

unread,
May 26, 2014, 5:54:03 PM5/26/14
to sol...@googlegroups.com


--
Mauricio

raghu ram

unread,
Mar 23, 2018, 1:21:18 PM3/23/18
to SolrNet
 How to Change From OR Operator to AND Operator

Example : {[q, (*:* AND (fieldname:((1) OR (2) OR (3))))]} to {[q, (*:* AND (fieldname:((1) AND (2) AND (3))))]}

Alan Roberto Pérez Hernández

unread,
Jun 2, 2020, 4:02:22 AM6/2/20
to SolrNet
Thnx! i've solve my problem.
Reply all
Reply to author
Forward
0 new messages