Package org.elasticsearch.search.facet.range

Examples of org.elasticsearch.search.facet.range.RangeFacet$Entry


    @Test
    public void testDateFacets() throws Exception {
        RangeFacet.Entry entries[] = new RangeFacet.Entry[2];       
        entries[0] = newEntry("-Infinity", "xy");       
        entries[1] = newEntry("xy", "Infinity");
        final RangeFacet rf = new InternalRangeFacet(ElasticTweetSearch.DATE_FACET, entries);

        SearchHits sh = mock(SearchHits.class);
        when(sh.getTotalHits()).thenReturn(10L);

        SearchResponse sr = mock(SearchResponse.class);
View Full Code Here


                .field("price")
                .addUnboundedFrom(3)
                .addRange(3, 6)
                .addUnboundedTo(6);

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

        // For each entry
        for (RangeFacet.Entry entry : f) {
            entry.getFrom();    // Range from requested
            entry.getTo();      // Range to requested
View Full Code Here

TOP

Related Classes of org.elasticsearch.search.facet.range.RangeFacet$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.