Search in sources :

Example 41 with SamplerAggregationBuilder

use of org.elasticsearch.search.aggregations.bucket.sampler.SamplerAggregationBuilder in project fess by codelibs.

the class BsRoleTypeCA method sampler.

public void sampler(String name, ConditionOptionCall<SamplerAggregationBuilder> opLambda, OperatorCall<BsRoleTypeCA> aggsLambda) {
    SamplerAggregationBuilder builder = regSamplerA(name);
    if (opLambda != null) {
        opLambda.callback(builder);
    }
    if (aggsLambda != null) {
        RoleTypeCA ca = new RoleTypeCA();
        aggsLambda.callback(ca);
        ca.getAggregationBuilderList().forEach(builder::subAggregation);
    }
}
Also used : RoleTypeCA(org.codelibs.fess.es.config.cbean.ca.RoleTypeCA) SamplerAggregationBuilder(org.elasticsearch.search.aggregations.bucket.sampler.SamplerAggregationBuilder)

Example 42 with SamplerAggregationBuilder

use of org.elasticsearch.search.aggregations.bucket.sampler.SamplerAggregationBuilder in project fess by codelibs.

the class BsRequestHeaderCA method sampler.

public void sampler(String name, ConditionOptionCall<SamplerAggregationBuilder> opLambda, OperatorCall<BsRequestHeaderCA> aggsLambda) {
    SamplerAggregationBuilder builder = regSamplerA(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) SamplerAggregationBuilder(org.elasticsearch.search.aggregations.bucket.sampler.SamplerAggregationBuilder)

Example 43 with SamplerAggregationBuilder

use of org.elasticsearch.search.aggregations.bucket.sampler.SamplerAggregationBuilder in project fess by codelibs.

the class BsClickLogCA method sampler.

public void sampler(String name, ConditionOptionCall<SamplerAggregationBuilder> opLambda, OperatorCall<BsClickLogCA> aggsLambda) {
    SamplerAggregationBuilder builder = regSamplerA(name);
    if (opLambda != null) {
        opLambda.callback(builder);
    }
    if (aggsLambda != null) {
        ClickLogCA ca = new ClickLogCA();
        aggsLambda.callback(ca);
        ca.getAggregationBuilderList().forEach(builder::subAggregation);
    }
}
Also used : SamplerAggregationBuilder(org.elasticsearch.search.aggregations.bucket.sampler.SamplerAggregationBuilder) ClickLogCA(org.codelibs.fess.es.log.cbean.ca.ClickLogCA)

Aggregations

SamplerAggregationBuilder (org.elasticsearch.search.aggregations.bucket.sampler.SamplerAggregationBuilder)43 SearchResponse (org.elasticsearch.action.search.SearchResponse)3 TermQueryBuilder (org.elasticsearch.index.query.TermQueryBuilder)3 Sampler (org.elasticsearch.search.aggregations.bucket.sampler.Sampler)3 Terms (org.elasticsearch.search.aggregations.bucket.terms.Terms)3 ElasticsearchAssertions.assertSearchResponse (org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse)3 AccessTokenCA (org.codelibs.fess.es.config.cbean.ca.AccessTokenCA)1 BadWordCA (org.codelibs.fess.es.config.cbean.ca.BadWordCA)1 BoostDocumentRuleCA (org.codelibs.fess.es.config.cbean.ca.BoostDocumentRuleCA)1 CrawlingInfoCA (org.codelibs.fess.es.config.cbean.ca.CrawlingInfoCA)1 CrawlingInfoParamCA (org.codelibs.fess.es.config.cbean.ca.CrawlingInfoParamCA)1 DataConfigCA (org.codelibs.fess.es.config.cbean.ca.DataConfigCA)1 DataConfigToLabelCA (org.codelibs.fess.es.config.cbean.ca.DataConfigToLabelCA)1 DataConfigToRoleCA (org.codelibs.fess.es.config.cbean.ca.DataConfigToRoleCA)1 DuplicateHostCA (org.codelibs.fess.es.config.cbean.ca.DuplicateHostCA)1 ElevateWordCA (org.codelibs.fess.es.config.cbean.ca.ElevateWordCA)1 ElevateWordToLabelCA (org.codelibs.fess.es.config.cbean.ca.ElevateWordToLabelCA)1 FailureUrlCA (org.codelibs.fess.es.config.cbean.ca.FailureUrlCA)1 FileAuthenticationCA (org.codelibs.fess.es.config.cbean.ca.FileAuthenticationCA)1 FileConfigCA (org.codelibs.fess.es.config.cbean.ca.FileConfigCA)1