Package org.elasticsearch.search.facet.terms.strings

Examples of org.elasticsearch.search.facet.terms.strings.InternalStringTermsFacet


    @Override protected void doCollect(int doc) throws IOException {
        count++;
    }

    @Override public Facet facet() {
        return new InternalStringTermsFacet(facetName, comparatorType, size, Sets.newHashSet(new InternalStringTermsFacet.StringEntry(indexName, count)), 0, count);
    }
View Full Code Here


            @Override
            public List<Facet> facets() {
                Set<InternalStringTermsFacet.StringEntry> entries = new LinkedHashSet();
                entries.add(new InternalStringTermsFacet.StringEntry("de", 3));
                entries.add(new InternalStringTermsFacet.StringEntry("en", 2));
                TermsFacet tf = new InternalStringTermsFacet("lang", null, 1, entries, 0, 0);               
                Set<InternalStringTermsFacet.StringEntry> entries2 = new LinkedHashSet();
                entries2.add(new InternalStringTermsFacet.StringEntry("peter", 3));
                entries2.add(new InternalStringTermsFacet.StringEntry("karsten", 2));
                TermsFacet tf2 = new InternalStringTermsFacet("user", null, 1, entries2, 0, 0);               
                List<Facet> res = new ArrayList<Facet>();
                res.add(tf);
                res.add(tf2);
                return res;
            }
View Full Code Here

TOP

Related Classes of org.elasticsearch.search.facet.terms.strings.InternalStringTermsFacet

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.