Package org.leskes.elasticfacets

Examples of org.leskes.elasticfacets.FacetedDateHistogramFacet$MultiEntry


                ).getBytes("UTF-8"))
          .execute().actionGet();

      assertThat(searchResponse.hits().totalHits(), equalTo(documentCount));

      FacetedDateHistogramFacet facet = searchResponse.facets().facet("facet1");
      assertThat(facet.name(), equalTo("facet1"));
      List<Entry> entries = facet.collapseToAList();
      assertThat(entries.size(), equalTo(2));
      assertThat(entries.get(0).time,equalTo(1341187200000L));
      assertThat(((TermsFacet)entries.get(0).facet()).getEntries().get(0).getTerm(), equalTo("week1"));
      assertThat(entries.get(1).time,equalTo(1341792000000L));
      assertThat(((TermsFacet)entries.get(1).facet()).getEntries().get(0).getTerm(), equalTo("week2"));
View Full Code Here

TOP

Related Classes of org.leskes.elasticfacets.FacetedDateHistogramFacet$MultiEntry

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.