Search in sources :

Example 1 with BsRoleCQ

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

the class BsRoleCA method filter.

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

Aggregations

RoleCA (org.codelibs.fess.es.user.cbean.ca.RoleCA)1 RoleCQ (org.codelibs.fess.es.user.cbean.cq.RoleCQ)1 BsRoleCQ (org.codelibs.fess.es.user.cbean.cq.bs.BsRoleCQ)1 FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1