Search in sources :

Example 1 with BsKeyMatchCQ

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

the class BsKeyMatchCA method filter.

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

Aggregations

KeyMatchCA (org.codelibs.fess.es.config.cbean.ca.KeyMatchCA)1 KeyMatchCQ (org.codelibs.fess.es.config.cbean.cq.KeyMatchCQ)1 BsKeyMatchCQ (org.codelibs.fess.es.config.cbean.cq.bs.BsKeyMatchCQ)1 FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1