lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Showing distance in results
Date Tue, 27 Jan 2015 17:20:14 GMT
Did you just try just setting up the demo then trying the example? I often
find if I advance step-by-step from the example, it is much easier
to figure things out.

sfield is the name of the field containing the location information,
"store" in the examples
Both "store", and "pt" are required to be defined by the geodist() function.

dist() is a different function query with its own syntax. If you use
geodist(), you must
define pt and sfield.

Best,
Erick

On Tue, Jan 27, 2015 at 8:30 AM, vit <bulgakov_v@yahoo.com> wrote:

> Hi Erick
> I tried this link but do not see a straight forward answer.
> For example it says:
> /You can use the pseudo-field feature to return the distance along with the
> stored fields of each document by adding fl=geodist() to the request/
> So I tried:
> ...?q={!func}dist(2, lat, lng, 0, 0)&fl=geodist()&wt=xml&indent=true
> <http://>   which returnes:
> *<lst name="error">
>   <str name="msg">Error parsing fieldname: geodist - not enough
> parameters:[]</str>
>   <int name="code">400</int>
> </lst>*
>
> Also it is not clear what is sfield=store in all examples, like this:
> ...&q={!func}geodist()&sfield=store&pt=45.15,-93.85&sort=score asc <http://
> >
> So if possible could you explain this either.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Showing-distance-in-results-tp4182077p4182284.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message