I’m playing with the new Solr 4 geospatial search. Like in an example from http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4 I’m trying to get the results like so:
http://localhost:8983/solr/allopenhours/select?
&q=foobar
&fq=geo:%22Intersects(Circle(54.729696,-98.525391%20d=0.08992))%22
&q={!%20score=distance}
&fl=*,score
But it doesn’t work. How can I get distance and score fields in the results set?
According to the reference Spatial Search – Returning the distance you can edit your fields parameter to do one of the following:
&fl=*,score,geodist()&fl=*,score,_dist_:geodist()– this one will return the distance in the alias_dist_