Search in sources :

Example 21 with RequestHeaderCA

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

the class BsRequestHeaderCA method setValue_IpRange.

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

Example 22 with RequestHeaderCA

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

the class BsRequestHeaderCA method filter.

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

Example 23 with RequestHeaderCA

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

the class BsRequestHeaderCA method setValue_Missing.

public void setValue_Missing(String name, ConditionOptionCall<MissingAggregationBuilder> opLambda, OperatorCall<BsRequestHeaderCA> aggsLambda) {
    MissingAggregationBuilder builder = regMissingA(name, "value");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
    if (aggsLambda != null) {
        RequestHeaderCA ca = new RequestHeaderCA();
        aggsLambda.callback(ca);
        ca.getAggregationBuilderList().forEach(builder::subAggregation);
    }
}
Also used : RequestHeaderCA(org.codelibs.fess.es.config.cbean.ca.RequestHeaderCA) MissingAggregationBuilder(org.elasticsearch.search.aggregations.bucket.missing.MissingAggregationBuilder)

Example 24 with RequestHeaderCA

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

the class BsRequestHeaderCA method setName_Terms.

public void setName_Terms(String name, ConditionOptionCall<TermsAggregationBuilder> opLambda, OperatorCall<BsRequestHeaderCA> aggsLambda) {
    TermsAggregationBuilder builder = regTermsA(name, "name");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
    if (aggsLambda != null) {
        RequestHeaderCA ca = new RequestHeaderCA();
        aggsLambda.callback(ca);
        ca.getAggregationBuilderList().forEach(builder::subAggregation);
    }
}
Also used : RequestHeaderCA(org.codelibs.fess.es.config.cbean.ca.RequestHeaderCA) TermsAggregationBuilder(org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder) SignificantTermsAggregationBuilder(org.elasticsearch.search.aggregations.bucket.significant.SignificantTermsAggregationBuilder)

Example 25 with RequestHeaderCA

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

the class BsRequestHeaderCA method setUpdatedBy_IpRange.

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

Aggregations

RequestHeaderCA (org.codelibs.fess.es.config.cbean.ca.RequestHeaderCA)29 SignificantTermsAggregationBuilder (org.elasticsearch.search.aggregations.bucket.significant.SignificantTermsAggregationBuilder)10 MissingAggregationBuilder (org.elasticsearch.search.aggregations.bucket.missing.MissingAggregationBuilder)7 IpRangeAggregationBuilder (org.elasticsearch.search.aggregations.bucket.range.ip.IpRangeAggregationBuilder)7 TermsAggregationBuilder (org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder)5 HistogramAggregationBuilder (org.elasticsearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder)2 RangeAggregationBuilder (org.elasticsearch.search.aggregations.bucket.range.RangeAggregationBuilder)2 RequestHeaderCQ (org.codelibs.fess.es.config.cbean.cq.RequestHeaderCQ)1 BsRequestHeaderCQ (org.codelibs.fess.es.config.cbean.cq.bs.BsRequestHeaderCQ)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