Re: GeoDistanceQuery?

Hi Ben

I am an ES beginner possibly migrating from Solr and I am trying to
apply a geo distance query term to my ES query, but I cant seem to
figure out how to do that. In my particular case I want the geo
radial bounding box to apply to all my facets and it appears that
adding the geoDistanceFilter() via setFilter() does not apply to
facets (which I think is normal). I was looking for something like
QueryBuilders.geoDistanceQuery() in the javaApi, but that doesn’t seem
to exist.

I suggest you gist an example of the query that you're using, so we can
figure out where you're going wrong. See

My guess is that you're using a "top-level" filter
(Elasticsearch Platform — Find real-time answers at scale | Elastic )
instead of a filtered query
(Elasticsearch Platform — Find real-time answers at scale | Elastic )

clint

If you want to apply filters just for specific facets, then you can set a filter on the relevant facets. In Java, each facet has a facetFitler method that accepts a filter (can be a geo bounding box filter).
On Monday, May 9, 2011 at 10:59 PM, Clinton Gormley wrote:

Hi Ben

I am an ES beginner possibly migrating from Solr and I am trying to
apply a geo distance query term to my ES query, but I cant seem to
figure out how to do that. In my particular case I want the geo
radial bounding box to apply to all my facets and it appears that
adding the geoDistanceFilter() via setFilter() does not apply to
facets (which I think is normal). I was looking for something like
QueryBuilders.geoDistanceQuery() in the javaApi, but that doesn’t seem
to exist.

I suggest you gist an example of the query that you're using, so we can
figure out where you're going wrong. See
Elasticsearch Platform — Find real-time answers at scale | Elastic

My guess is that you're using a "top-level" filter
(Elasticsearch Platform — Find real-time answers at scale | Elastic )
instead of a filtered query
(Elasticsearch Platform — Find real-time answers at scale | Elastic )

clint