Search in sources :

Example 1 with BsLabelToRoleCQ

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

the class BsLabelToRoleCA method filter.

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

Aggregations

LabelToRoleCA (org.codelibs.fess.es.config.cbean.ca.LabelToRoleCA)1 LabelToRoleCQ (org.codelibs.fess.es.config.cbean.cq.LabelToRoleCQ)1 BsLabelToRoleCQ (org.codelibs.fess.es.config.cbean.cq.bs.BsLabelToRoleCQ)1 FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1