Search in sources :

Example 11 with DataConfigToLabelCA

use of org.codelibs.fess.es.config.cbean.ca.DataConfigToLabelCA in project fess by codelibs.

the class BsDataConfigToLabelCA method filter.

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

Aggregations

DataConfigToLabelCA (org.codelibs.fess.es.config.cbean.ca.DataConfigToLabelCA)11 SignificantTermsAggregationBuilder (org.elasticsearch.search.aggregations.bucket.significant.SignificantTermsAggregationBuilder)4 MissingAggregationBuilder (org.elasticsearch.search.aggregations.bucket.missing.MissingAggregationBuilder)2 IpRangeAggregationBuilder (org.elasticsearch.search.aggregations.bucket.range.ip.IpRangeAggregationBuilder)2 TermsAggregationBuilder (org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder)2 DataConfigToLabelCQ (org.codelibs.fess.es.config.cbean.cq.DataConfigToLabelCQ)1 BsDataConfigToLabelCQ (org.codelibs.fess.es.config.cbean.cq.bs.BsDataConfigToLabelCQ)1 FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1 GlobalAggregationBuilder (org.elasticsearch.search.aggregations.bucket.global.GlobalAggregationBuilder)1 SamplerAggregationBuilder (org.elasticsearch.search.aggregations.bucket.sampler.SamplerAggregationBuilder)1