From 9f441d8b9f7c41205ee23264fbec64756974ff58 Mon Sep 17 00:00:00 2001 From: kimchy Date: Sun, 1 Aug 2010 17:09:40 +0300 Subject: [PATCH] add filter and global support --- .../facets/geodistance/GeoDistanceFacetBuilder.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/geodistance/GeoDistanceFacetBuilder.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/geodistance/GeoDistanceFacetBuilder.java index 2cec1c20513..667361a5036 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/geodistance/GeoDistanceFacetBuilder.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/geodistance/GeoDistanceFacetBuilder.java @@ -24,6 +24,7 @@ import org.elasticsearch.common.collect.Maps; import org.elasticsearch.common.lucene.geo.GeoDistance; import org.elasticsearch.common.unit.DistanceUnit; import org.elasticsearch.common.xcontent.builder.XContentBuilder; +import org.elasticsearch.index.query.xcontent.XContentFilterBuilder; import org.elasticsearch.search.builder.SearchSourceBuilderException; import org.elasticsearch.search.facets.AbstractFacetBuilder; @@ -185,6 +186,16 @@ public class GeoDistanceFacetBuilder extends AbstractFacetBuilder { return this; } + public GeoDistanceFacetBuilder global(boolean global) { + this.global = global; + return this; + } + + public GeoDistanceFacetBuilder filter(XContentFilterBuilder filter) { + this.filter = filter; + return this; + } + @Override public void toXContent(XContentBuilder builder, Params params) throws IOException { if (fieldName == null) { throw new SearchSourceBuilderException("field must be set on geo_distance facet for facet [" + name + "]");