Package org.elasticsearch.search.facet.datehistogram

Examples of org.elasticsearch.search.facet.datehistogram.DateHistogramFacet$Entry


    public void dateHistogramFacet() throws Exception {
        DateHistogramFacetBuilder facet = FacetBuilders.dateHistogramFacet("f")
                .field("date")
                .interval("year");

        DateHistogramFacet f = (DateHistogramFacet) launchSearch(facet, "f");

        // For each entry
        for (DateHistogramFacet.Entry entry : f) {
            entry.getTime();    // Date in ms since epoch (X-Axis)
            entry.getCount();   // Doc count (Y-Axis)
View Full Code Here

TOP

Related Classes of org.elasticsearch.search.facet.datehistogram.DateHistogramFacet$Entry

Copyright © 2018 www.massapicom. 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.