lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dan sutton <danbsut...@gmail.com>
Subject spatial sorting
Date Fri, 17 Sep 2010 13:45:04 GMT
Hi,

I'm trying to filter and sort by distance with this URL:

http://localhost:8080/solr/select/?q=*:*&fq={!sfilt%20fl=loc_lat_lon}&pt=52.02694,-0.49567&d=2&sort={!func}hsin(52.02694,-0.49567,loc_lat_lon_0_d,%20loc_lat_lon_1_d,3963.205)asc

Filtering is fine but it's failing in parsing the sort with :

"The request sent by the client was syntactically incorrect (can not sort on
undefined field or function: {!func}(52.02694,-0.49567,loc_lat_lon_0_d,
loc_lat_lon_1_d, 3963.205))."*

*I'm using the solr/lucene trunk to try this out ... does anyone know what
is wrong with the syntax?

Additionally am I able to return the distance sort values e.g. with param fl
? ... else am I going to have to either write my own component (which would
also look up the filtered cached values rather than re-calculating distance)
or use an alternative like localsolr ?

Dan

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