Search in sources :

Example 1 with BsPathMappingCQ

use of org.codelibs.fess.es.config.cbean.cq.bs.BsPathMappingCQ in project fess by codelibs.

the class BsPathMappingCA method filter.

// ===================================================================================
//                                                                     Aggregation Set
//                                                                           =========
public void filter(String name, EsAbstractConditionQuery.OperatorCall<BsPathMappingCQ> queryLambda, ConditionOptionCall<FilterAggregationBuilder> opLambda, OperatorCall<BsPathMappingCA> aggsLambda) {
    PathMappingCQ cq = new PathMappingCQ();
    if (queryLambda != null) {
        queryLambda.callback(cq);
    }
    FilterAggregationBuilder builder = regFilterA(name, cq.getQuery());
    if (opLambda != null) {
        opLambda.callback(builder);
    }
    if (aggsLambda != null) {
        PathMappingCA ca = new PathMappingCA();
        aggsLambda.callback(ca);
        ca.getAggregationBuilderList().forEach(builder::subAggregation);
    }
}
Also used : FilterAggregationBuilder(org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder) PathMappingCQ(org.codelibs.fess.es.config.cbean.cq.PathMappingCQ) BsPathMappingCQ(org.codelibs.fess.es.config.cbean.cq.bs.BsPathMappingCQ) PathMappingCA(org.codelibs.fess.es.config.cbean.ca.PathMappingCA)

Aggregations

PathMappingCA (org.codelibs.fess.es.config.cbean.ca.PathMappingCA)1 PathMappingCQ (org.codelibs.fess.es.config.cbean.cq.PathMappingCQ)1 BsPathMappingCQ (org.codelibs.fess.es.config.cbean.cq.bs.BsPathMappingCQ)1 FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1