Search in sources :

Example 1 with BsFileConfigCQ

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

the class BsFileConfigCA method filter.

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

Aggregations

FileConfigCA (org.codelibs.fess.es.config.cbean.ca.FileConfigCA)1 FileConfigCQ (org.codelibs.fess.es.config.cbean.cq.FileConfigCQ)1 BsFileConfigCQ (org.codelibs.fess.es.config.cbean.cq.bs.BsFileConfigCQ)1 FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1