Hi all,
I'm looking for some help with SolrJ for querying spatial data. I have the
following URL query working fine, where it returns the results which are
within 100km radius from the 'pt' provided in the URL and where the
timestamp field is between the two timestamps provided in the URL. It also
returns me the 'distance' for each result.

http://localhost:8983/solr/geoloc/select/?q=*:*&fq={!geofilt}&sfield=latlong&pt=-6.08165,145.8612430&d=100&wt=json&fq=timestamp:[1518908400000%20TO%201518912000000]&fl=*,_dist_:geodist()

But I'm not sure how to build the SolrJ equivalent of this query using
SolrQuery. I tried something like

SolrQuery query = new SolrQuery();
query.setQuery("
&fq={!geofilt}&sfield=latlong&pt=-6.08165,145.8612430&d=100&wt=json&fq=timestamp:[1518908400000%20TO%201518912000000]&fl=*,_dist_:geodist()")

and it throws errors. I've been trying to find some samples for 'SolrQuery'
class but without luck. Can someone give some sample usage of SolrQuery for
spatial data?

Reply via email to