Search in sources :

Example 1 with BsDataConfigCQ

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

the class BsDataConfigCA method filter.

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

Aggregations

DataConfigCA (org.codelibs.fess.es.config.cbean.ca.DataConfigCA)1 DataConfigCQ (org.codelibs.fess.es.config.cbean.cq.DataConfigCQ)1 BsDataConfigCQ (org.codelibs.fess.es.config.cbean.cq.bs.BsDataConfigCQ)1 FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1