Search in sources :

Example 46 with DataConfigCA

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

the class BsDataConfigCA method setUpdatedBy_IpRange.

public void setUpdatedBy_IpRange(String name, ConditionOptionCall<IpRangeAggregationBuilder> opLambda, OperatorCall<BsDataConfigCA> aggsLambda) {
    IpRangeAggregationBuilder builder = regIpRangeA(name, "updatedBy");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
    if (aggsLambda != null) {
        DataConfigCA ca = new DataConfigCA();
        aggsLambda.callback(ca);
        ca.getAggregationBuilderList().forEach(builder::subAggregation);
    }
}
Also used : IpRangeAggregationBuilder(org.elasticsearch.search.aggregations.bucket.range.ip.IpRangeAggregationBuilder) DataConfigCA(org.codelibs.fess.es.config.cbean.ca.DataConfigCA)

Example 47 with DataConfigCA

use of org.codelibs.fess.es.config.cbean.ca.DataConfigCA 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)47 SignificantTermsAggregationBuilder (org.elasticsearch.search.aggregations.bucket.significant.SignificantTermsAggregationBuilder)14 MissingAggregationBuilder (org.elasticsearch.search.aggregations.bucket.missing.MissingAggregationBuilder)13 IpRangeAggregationBuilder (org.elasticsearch.search.aggregations.bucket.range.ip.IpRangeAggregationBuilder)12 TermsAggregationBuilder (org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder)7 HistogramAggregationBuilder (org.elasticsearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder)5 RangeAggregationBuilder (org.elasticsearch.search.aggregations.bucket.range.RangeAggregationBuilder)5 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 GlobalAggregationBuilder (org.elasticsearch.search.aggregations.bucket.global.GlobalAggregationBuilder)1 SamplerAggregationBuilder (org.elasticsearch.search.aggregations.bucket.sampler.SamplerAggregationBuilder)1