Package org.elasticsearch.search.facet

Examples of org.elasticsearch.search.facet.AbstractFacetBuilder


            return tmp;
    }

    @Override
    public AbstractFacetBuilder fromFacetField(String ff, int limit) {
        AbstractFacetBuilder facetBuilder;
//        if (ff.equals(ElasticTweetSearch.FIRST_URL_TITLE) || ff.equals(ElasticTweetSearch.TAG)) {
        // hmmh no real differences ... strange
//            facetBuilder = FacetBuilders.termsStatsFacet(ff).keyField(ff).valueScript("doc.score").order(ComparatorType.TOTAL).size(limit);
//                    fb = FacetBuilders.termsStats(ff).keyField(ff).valueScript("doc.relevance.value").order(ComparatorType.TOTAL);//.size(15);
//                    fb = FacetBuilders.termsStats(ff).keyField(ff).valueScript("doc.relevance.value").order(ComparatorType.COUNT).size(15);
//        } else       
        facetBuilder = super.fromFacetField(ff, limit);

        if (dateFilter != null)
            facetBuilder.facetFilter(dateFilter);

        return facetBuilder;
    }
View Full Code Here


        return facetBuilder;
    }

    @Override
    public AbstractFacetBuilder fromFacetQuery(StrEntry e) {
        AbstractFacetBuilder facetBuilder = super.fromFacetQuery(e);
        if (dateFilter != null)
            facetBuilder.facetFilter(dateFilter);
        return facetBuilder;
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.search.facet.AbstractFacetBuilder

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.