From a342029d36fc8cdd6be3ab540cd2527ddd022188 Mon Sep 17 00:00:00 2001 From: kimchy Date: Mon, 15 Nov 2010 15:05:50 +0200 Subject: [PATCH] Histogram Facet: Allow to define a key field and value script, closes #517. --- .../facet/histogram/KeyValueScriptHistogramFacetCollector.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/KeyValueScriptHistogramFacetCollector.java b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/KeyValueScriptHistogramFacetCollector.java index 7c7d7def474..8c1ae4e0f8b 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/KeyValueScriptHistogramFacetCollector.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/search/facet/histogram/KeyValueScriptHistogramFacetCollector.java @@ -95,6 +95,7 @@ public class KeyValueScriptHistogramFacetCollector extends AbstractFacetCollecto @Override protected void doSetNextReader(IndexReader reader, int docBase) throws IOException { fieldData = (NumericFieldData) fieldDataCache.cache(fieldDataType, reader, indexFieldName); + valueScript.setNextReader(reader); } @Override public Facet facet() {