Search in sources :

Example 1 with BsGroupCQ

use of org.codelibs.fess.es.user.cbean.cq.bs.BsGroupCQ in project fess by codelibs.

the class BsGroupCA method filter.

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

Aggregations

GroupCA (org.codelibs.fess.es.user.cbean.ca.GroupCA)1 GroupCQ (org.codelibs.fess.es.user.cbean.cq.GroupCQ)1 BsGroupCQ (org.codelibs.fess.es.user.cbean.cq.bs.BsGroupCQ)1 FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1