I'm using the geo_distance filter to lookup a list of vehicle dealers
within a radius starting from a GeoPoint location.
The problem is that the returned terms facets ignore the filter and return
the whole count.
Is there any way to get the facets aware of the filters the same as with
queries or to achieve the same thing with the geo_shape query ?
if you want the facets to use the filter, use a filtered query inside of
your "query" field which incorporates the "filter" field. A top level
filter is never used for facets. Alternatively you can also add facet
filters to your facet query in order to reduce results.
I'm using the geo_distance filter to lookup a list of vehicle dealers
within a radius starting from a GeoPoint location.
The problem is that the returned terms facets ignore the filter and return
the whole count.
Is there any way to get the facets aware of the filters the same as with
queries or to achieve the same thing with the geo_shape query ?
It's working perfectly. Thanks you Alex for your clear explanation
Regards,
On Wednesday, May 22, 2013 11:10:06 AM UTC+2, Alexander Reelsen wrote:
Hey,
if you want the facets to use the filter, use a filtered query inside of
your "query" field which incorporates the "filter" field. A top level
filter is never used for facets. Alternatively you can also add facet
filters to your facet query in order to reduce results.
Hope this helps.
--Alex
On Wed, May 22, 2013 at 10:57 AM, Mehrez Marouani <mehrez....@gmail.com<javascript:>
wrote:
Hi,
I'm using the geo_distance filter to lookup a list of vehicle dealers
within a radius starting from a GeoPoint location.
The problem is that the returned terms facets ignore the filter and
return the whole count.
Is there any way to get the facets aware of the filters the same as with
queries or to achieve the same thing with the geo_shape query ?
Here the model facet returns the same count as if we remove the filter.
I will really appreciate your help.
Regards,
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.