Search in sources :

Example 1 with BsBadWordCQ

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

the class BsBadWordCA method filter.

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

Aggregations

BadWordCA (org.codelibs.fess.es.config.cbean.ca.BadWordCA)1 BadWordCQ (org.codelibs.fess.es.config.cbean.cq.BadWordCQ)1 BsBadWordCQ (org.codelibs.fess.es.config.cbean.cq.bs.BsBadWordCQ)1 FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1