Package org.elasticsearch.search.facet

Examples of org.elasticsearch.search.facet.Facets.facets()


        }

        if (rsp != null) {
            Facets facets = rsp.facets();
            if (facets != null)
                for (Facet facet : facets.facets()) {
                    if (facet instanceof TermsFacet) {
                        TermsFacet ff = (TermsFacet) facet;
                        Integer integ = filterToIndex.get(ff.getName());
                        if (integ != null && ff.entries() != null) {
                            List<FacetHelper> list = new ArrayList<FacetHelper>();
View Full Code Here


        Facets facets = rsp.facets();
        if (facets == null)
            return ret;

        for (Facet facet : facets.facets()) {
            if (facet instanceof TermsFacet) {
                TermsFacet ff = (TermsFacet) facet;
                Integer integ = filterToIndex.get(ff.getName());
                if (integ != null && ff.entries() != null) {
                    List<FacetHelper> list = new ArrayList<FacetHelper>();
View Full Code Here

            Facets facets = rsp.facets();
            if (facets == null)
                return Collections.emptyList();

            Set<String> set = new LinkedHashSet<String>();
            for (Facet facet : facets.facets()) {
                if (facet instanceof TermsFacet) {
                    TermsFacet ff = (TermsFacet) facet;
                    for (TermsFacet.Entry e : ff.entries()) {
                        if (e.count() > limit)
                            set.add(e.getTerm());
View Full Code Here

        // Validation stuff

        public void checkResults(final SearchResponse myResponse) throws IOException {
            _response = myResponse;
            final Facets facets = myResponse.getFacets();
            assertEquals("Found " + facets.facets().size() + " facets instead of 1", 1, facets.facets().size());
            final Facet facet = facets.facet(_facetName);
            assertEquals(queryType(), facet.getType());
            checkEntries(facet);
            checkHeaders(facet);
        }
View Full Code Here

        // Validation stuff

        public void checkResults(final SearchResponse myResponse) throws IOException {
            _response = myResponse;
            final Facets facets = myResponse.getFacets();
            assertEquals("Found " + facets.facets().size() + " facets instead of 1", 1, facets.facets().size());
            final Facet facet = facets.facet(_facetName);
            assertEquals(queryType(), facet.getType());
            checkEntries(facet);
            checkHeaders(facet);
        }
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.