Package org.elasticsearch.index.query

Examples of org.elasticsearch.index.query.TermsFilterBuilder


            List<String> apiRef = splitFilters.get("apiRef");
            List<String> otherFacetPaths = splitFilters.get("others");

            AndFilterBuilder projectApiRefAnded = new AndFilterBuilder();
            if (apiRef.size() > 0) {
                projectApiRefAnded.add(new TermsFilterBuilder("facetPaths", apiRef).execution("or"));
            }

            if (projects.size() > 0) {
                projectApiRefAnded.add(new TermsFilterBuilder("facetPaths", projects).execution("or"));
            }

            OrFilterBuilder outermostFilter = new OrFilterBuilder();
            outermostFilter.add(projectApiRefAnded);
            if (otherFacetPaths.size() > 0) {
                outermostFilter.add(new TermsFilterBuilder("facetPaths", otherFacetPaths).execution("or"));
            }

            filterBuilder.add(outermostFilter);
        }
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.index.query.TermsFilterBuilder

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.