wrong type returned by date_histogram, closes #932.

This commit is contained in:
kimchy 2011-05-15 17:13:05 +03:00
parent c823355014
commit 30df0d8324
2 changed files with 2 additions and 4 deletions

View File

@ -27,7 +27,6 @@ import org.elasticsearch.common.trove.map.hash.TLongLongHashMap;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentBuilderString;
import org.elasticsearch.search.facet.Facet;
import org.elasticsearch.search.facet.histogram.HistogramFacet;
import java.io.IOException;
import java.util.Arrays;
@ -223,7 +222,7 @@ public class InternalCountDateHistogramFacet extends InternalDateHistogramFacet
@Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject(name);
builder.field(Fields._TYPE, HistogramFacet.TYPE);
builder.field(Fields._TYPE, TYPE);
builder.startArray(Fields.ENTRIES);
for (Entry entry : computeEntries()) {
builder.startObject();

View File

@ -26,7 +26,6 @@ import org.elasticsearch.common.trove.ExtTLongObjectHashMap;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentBuilderString;
import org.elasticsearch.search.facet.Facet;
import org.elasticsearch.search.facet.histogram.HistogramFacet;
import java.io.IOException;
import java.util.*;
@ -257,7 +256,7 @@ public class InternalFullDateHistogramFacet extends InternalDateHistogramFacet {
@Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject(name);
builder.field(Fields._TYPE, HistogramFacet.TYPE);
builder.field(Fields._TYPE, TYPE);
builder.startArray(Fields.ENTRIES);
for (Entry entry : entries()) {
builder.startObject();