When I try this form the stock solr example (using "store" rather than
"coordinate" for the field, your first example gives me an error of
"d must be > 0" or some such. When I add a "d" value to the query,
both your first and second queries work just fine and the second
returns a "geodist" value in the response.

You say you're using Solr 4.0. When did you get it? Have you tried
this with a very recent trunk?

Best
Erick

On Fri, Aug 26, 2011 at 10:29 AM, solrnovice <manisha...@yahoo.com> wrote:
> Hi, i am trying to return distance in the solr query, by passing in the
> "fl=geodist()" and i dont see distance being returned.
> We have a field called coordinates which is configured as latlong and when i
> perform the following search, i do see results
> q=*:*&fq={!geofilt}&sfield=coordinates&pt=31.2225,-85.3931&fl=id,name   =>
> this works fine
>
> q=*:*&fq={!geofilt}&sfield=coordinates&pt=31.2225,-85.3931&fl=id,name,geodist()
> => this doesnt return distance
>
>
> But when i add geodist() to the "fl parameter", i dont see the pseudo column
> being returned. It returns the "id" and "name" only, but not the distance.
> WE are using Solr 4.0. Can anybody please let me know what is wrong with the
> query?  I also tried passing in the lat , long as arguments to the geodist,
> but doesnt help.
>
> I am totally lost in the solr system, can anybody please help?
>
> thanks
> SolrNovice
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Solr-Geodist-tp3287005p3287005.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to