Search in sources :

Example 1 with SearchFieldLogCA

use of org.codelibs.fess.es.log.cbean.ca.SearchFieldLogCA in project fess by codelibs.

the class BsSearchFieldLogCA method filter.

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

Example 2 with SearchFieldLogCA

use of org.codelibs.fess.es.log.cbean.ca.SearchFieldLogCA in project fess by codelibs.

the class BsSearchFieldLogCA method setValue_Terms.

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

Example 3 with SearchFieldLogCA

use of org.codelibs.fess.es.log.cbean.ca.SearchFieldLogCA in project fess by codelibs.

the class BsSearchFieldLogCA method setValue_IpRange.

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

Example 4 with SearchFieldLogCA

use of org.codelibs.fess.es.log.cbean.ca.SearchFieldLogCA in project fess by codelibs.

the class BsSearchFieldLogCA method setSearchLogId_IpRange.

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

Example 5 with SearchFieldLogCA

use of org.codelibs.fess.es.log.cbean.ca.SearchFieldLogCA in project fess by codelibs.

the class BsSearchFieldLogCA method setName_IpRange.

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

Aggregations

SearchFieldLogCA (org.codelibs.fess.es.log.cbean.ca.SearchFieldLogCA)15 SignificantTermsAggregationBuilder (org.elasticsearch.search.aggregations.bucket.significant.SignificantTermsAggregationBuilder)6 MissingAggregationBuilder (org.elasticsearch.search.aggregations.bucket.missing.MissingAggregationBuilder)3 IpRangeAggregationBuilder (org.elasticsearch.search.aggregations.bucket.range.ip.IpRangeAggregationBuilder)3 TermsAggregationBuilder (org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder)3 SearchFieldLogCQ (org.codelibs.fess.es.log.cbean.cq.SearchFieldLogCQ)1 BsSearchFieldLogCQ (org.codelibs.fess.es.log.cbean.cq.bs.BsSearchFieldLogCQ)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