Search in sources :

Example 1 with BsUserCQ

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

the class BsUserCA method filter.

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

Aggregations

UserCA (org.codelibs.fess.es.user.cbean.ca.UserCA)1 UserCQ (org.codelibs.fess.es.user.cbean.cq.UserCQ)1 BsUserCQ (org.codelibs.fess.es.user.cbean.cq.bs.BsUserCQ)1 FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1