Filter query with (Spatial query OR Query By field)

288 views
Skip to first unread message

Shreejay

unread,
Oct 29, 2013, 5:56:19 PM10/29/13
to sol...@googlegroups.com

Hi, 

I am using Solrnet version 0.4.0.2002. I am trying to create this query using SolrNet

&fq=({!geofilt+pt=32.768397,-117.155151+sfield=lat_long_field+d=50} OR some_random_field:("Some Random Text"))


I create and use Spatial queries in my program but have never used OR along with a spatial search. Here is how I create a Spatial search and then add it to a Filer List. 


 var spatialSearch = new LocalParams { { "type", "geofilt" }, { "pt", LatLong }, { "sfield", "lat_long_field" }, { "d", Miles.ToString() } } + new SolrQuery(""); 

For the other filter query
 some_random_field:("Some Random Text")) 
 
I do the following 
var query = Query.Field("some_random_field").Is("Some Random Text"); 

I cant do 

var search = spatialSearch || query; 

This throws an error "Operator '||' cannot be applied to operands of type 'SolrNet.SolrQueryByField' and 'SolrNet.ISolrQuery' 

Is it possible to form the query using Solrnet? 


--Shreejay

Mauricio Scheffer

unread,
Oct 29, 2013, 9:28:40 PM10/29/13
to sol...@googlegroups.com


--
Mauricio


--
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/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages