You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Fergus McDowall <fe...@gmail.com> on 2011/06/02 08:50:35 UTC

Re: Faceting on distance in Solr: how do you generate links that search withing a given range of distance?

On Fri, May 20, 2011 at 12:40 AM, Chris Hostetter
<ho...@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()
>
> ...to get a count of "34" and the user wants to constrain to those docs,
> you would add...
>
>   fq={!frange l=5.001 u=3000}geodist()
>
> ...to the query to do that.
>
>
> -Hoss
>


 Yup- that did itCheers!