Package org.elasticsearch.search.facet.filter

Examples of org.elasticsearch.search.facet.filter.FilterFacetBuilder


    public static QueryFacetBuilder queryFacet(String facetName, QueryBuilder query) {
        return new QueryFacetBuilder(facetName).query(query);
    }

    public static FilterFacetBuilder filterFacet(String facetName) {
        return new FilterFacetBuilder(facetName);
    }
View Full Code Here


    public static FilterFacetBuilder filterFacet(String facetName) {
        return new FilterFacetBuilder(facetName);
    }

    public static FilterFacetBuilder filterFacet(String facetName, FilterBuilder filter) {
        return new FilterFacetBuilder(facetName).filter(filter);
    }
View Full Code Here

     * @throws Exception
     * <br>See <a href="http://www.elasticsearch.org/guide/reference/api/search/facets/filter-facet.html">documentation</a>
     */
    @Test
    public void filterFacet() throws Exception {
        FilterFacetBuilder facet = FacetBuilders.filterFacet("f",
                FilterBuilders.termFilter("brand", "heineken"));

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

        f.getCount();   // Number of docs that matched
View Full Code Here

TOP

Related Classes of org.elasticsearch.search.facet.filter.FilterFacetBuilder

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.