Package crate.elasticsearch.facet.distinct

Examples of crate.elasticsearch.facet.distinct.InternalDistinctDateHistogramFacet.toXContent()


                .setSearchType(SearchType.COUNT)
                .setFacets(facetQuery.bytes().array())
                .execute().actionGet();
        InternalDistinctDateHistogramFacet facet = (InternalDistinctDateHistogramFacet) response.getFacets().facet("distinct");
        XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON).startObject();
        facet.toXContent(builder, ToXContent.EMPTY_PARAMS).endObject();
        assertThat(builder.string(), equalTo(
                "{\"distinct\":{" +
                        "\"_type\":\"distinct_date_histogram\",\"entries\":[" +
                        "{\"time\":950400000,\"count\":1}" +
                        "]," +
View Full Code Here


                .setSearchType(SearchType.COUNT)
                .setFacets(facetQuery.bytes().array())
                .execute().actionGet();
        facet = (InternalDistinctDateHistogramFacet) response.getFacets().facet("distinct");
        builder = XContentFactory.contentBuilder(XContentType.JSON).startObject();
        facet.toXContent(builder, ToXContent.EMPTY_PARAMS).endObject();
        assertThat(builder.string(), equalTo(
                "{\"distinct\":{" +
                        "\"_type\":\"distinct_date_histogram\",\"entries\":[" +
                        "{\"time\":950400000,\"count\":2}" +
                        "]," +
View Full Code Here

                .setSearchType(SearchType.COUNT)
                .setFacets(facetQuery.bytes().array())
                .execute().actionGet();
        facet = (InternalDistinctDateHistogramFacet) response.getFacets().facet("distinct");
        builder = XContentFactory.contentBuilder(XContentType.JSON).startObject();
        facet.toXContent(builder, ToXContent.EMPTY_PARAMS).endObject();
        assertThat(builder.string(), equalTo(
                "{\"distinct\":{" +
                        "\"_type\":\"distinct_date_histogram\",\"entries\":[" +
                        "{\"time\":950400000,\"count\":2}," +
                        "{\"time\":1555200000,\"count\":3}" +
View Full Code Here

                .setSearchType(SearchType.COUNT)
                .setFacets(facetQuery.bytes().array())
                .execute().actionGet();
        InternalDistinctDateHistogramFacet facet = (InternalDistinctDateHistogramFacet) response.getFacets().facet("distinct");
        XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON).startObject();
        facet.toXContent(builder, ToXContent.EMPTY_PARAMS).endObject();
        assertThat(builder.string(), equalTo(
                "{\"distinct\":{" +
                        "\"_type\":\"distinct_date_histogram\",\"entries\":[" +
                        "{\"time\":950400000,\"count\":1}" +
                        "]," +
View Full Code Here

                .setSearchType(SearchType.COUNT)
                .setFacets(facetQuery.bytes().array())
                .execute().actionGet();
        facet = (InternalDistinctDateHistogramFacet) response.getFacets().facet("distinct");
        builder = XContentFactory.contentBuilder(XContentType.JSON).startObject();
        facet.toXContent(builder, ToXContent.EMPTY_PARAMS).endObject();
        assertThat(builder.string(), equalTo(
                "{\"distinct\":{" +
                        "\"_type\":\"distinct_date_histogram\",\"entries\":[" +
                        "{\"time\":950400000,\"count\":2}" +
                        "]," +
View Full Code Here

                .setSearchType(SearchType.COUNT)
                .setFacets(facetQuery.bytes().array())
                .execute().actionGet();
        facet = (InternalDistinctDateHistogramFacet) response.getFacets().facet("distinct");
        builder = XContentFactory.contentBuilder(XContentType.JSON).startObject();
        facet.toXContent(builder, ToXContent.EMPTY_PARAMS).endObject();
        assertThat(builder.string(), equalTo(
                "{\"distinct\":{" +
                        "\"_type\":\"distinct_date_histogram\",\"entries\":[" +
                        "{\"time\":950400000,\"count\":2}," +
                        "{\"time\":1555200000,\"count\":3}" +
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.