Package org.elasticsearch.search.facet.statistical

Examples of org.elasticsearch.search.facet.statistical.StatisticalFacet.min()


            StatisticalFacet facet = searchResponse.facets().facet("stats1");
            assertThat(facet.name(), equalTo(facet.name()));
            assertThat(facet.count(), equalTo(2l));
            assertThat(facet.total(), equalTo(3d));
            assertThat(facet.min(), equalTo(1d));
            assertThat(facet.max(), equalTo(2d));
            assertThat(facet.mean(), equalTo(1.5d));
            assertThat(facet.sumOfSquares(), equalTo(5d));

            facet = searchResponse.facets().facet("stats2");
View Full Code Here


            facet = searchResponse.facets().facet("stats2");
            assertThat(facet.name(), equalTo(facet.name()));
            assertThat(facet.count(), equalTo(4l));
            assertThat(facet.total(), equalTo(10d));
            assertThat(facet.min(), equalTo(1d));
            assertThat(facet.max(), equalTo(4d));
            assertThat(facet.mean(), equalTo(2.5d));

            facet = searchResponse.facets().facet("stats3");
            assertThat(facet.name(), equalTo(facet.name()));
View Full Code Here

            facet = searchResponse.facets().facet("stats3");
            assertThat(facet.name(), equalTo(facet.name()));
            assertThat(facet.count(), equalTo(2l));
            assertThat(facet.total(), equalTo(6d));
            assertThat(facet.min(), equalTo(2d));
            assertThat(facet.max(), equalTo(4d));
            assertThat(facet.mean(), equalTo(3d));
            assertThat(facet.sumOfSquares(), equalTo(20d));

            // test multi field facet
View Full Code Here

            facet = searchResponse.facets().facet("stats");
            assertThat(facet.name(), equalTo(facet.name()));
            assertThat(facet.count(), equalTo(6l));
            assertThat(facet.total(), equalTo(13d));
            assertThat(facet.min(), equalTo(1d));
            assertThat(facet.max(), equalTo(4d));
            assertThat(facet.mean(), equalTo(13d / 6d));
            assertThat(facet.sumOfSquares(), equalTo(35d));

            // test cross field facet using the same facet name...
View Full Code Here

            facet = searchResponse.facets().facet("stats");
            assertThat(facet.name(), equalTo(facet.name()));
            assertThat(facet.count(), equalTo(6l));
            assertThat(facet.total(), equalTo(13d));
            assertThat(facet.min(), equalTo(1d));
            assertThat(facet.max(), equalTo(4d));
            assertThat(facet.mean(), equalTo(13d / 6d));
            assertThat(facet.sumOfSquares(), equalTo(35d));
        }
    }
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.