On Thu, May 19, 2011 at 6:40 PM, Chris Hostetter <hossman_luc...@fucit.org> wrote: > > : It is fairly simple to generate facets for ranges or 'buckets' of > : distance in Solr: > : http://wiki.apache.org/solr/SpatialSearch#How_to_facet_by_distance. > : What isnt described is how to generate the links for these facets > > any query you specify in a facet.query to generate a constraint count can > be specified in an fq to actaully apply that constraint. > > So if you use... > facet.query={!frange l=5.001 u=3000}geodist()
Hmmm, seems like we could really do with a geofilt() function that's just like geodist() but with the first parameter being distance so we could avoid calculating the distance for every doc. And of course the new exists() method (it's just internal now, but should be exposed via a function) would be false if the doc was outside of the distance. The best we could do out of the box right now is try to utilize the geofilt query and default it to a high number where it doesn't match: facet.query={!frange l=5.001 u=3000}query($gf,10000)&gf={!geofilt d=3000} Of course if the lower bound is 0, you can use it directly! facet.query={!geofilt d=3000} -Yonik