One way to do it is to group by city and then sort=geodist() asc select?group=true&group.field=city&sort=geodist() desc&rows=10&fl=city
It might require 2 calls to SOLR to get it the way you want. On Wed, Feb 15, 2012 at 5:51 PM, Eric Grobler <impalah...@googlemail.com> wrote: > Hi Solr community, > > I am doing a spatial search and then do a facet by city. > Is it possible to then sort the faceted cities by distance? > > We would like to display the hits per city, but sort them by distance. > > Thanks & Regards > Ericz > > q=iphone > fq={!bbox} > sfield=geopoint > pt=49.594857,8.468614 > d=50 > fl=id,description,city,geopoint > > facet=true > facet.field=city > f.city.facet.limit=10 > f.city.facet.sort=count //geodist() asc -- Bill Bell billnb...@gmail.com cell 720-256-8076