Search in sources :

Example 26 with SamplerAggregationBuilder

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

the class BsCrawlingInfoCA method sampler.

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

Example 27 with SamplerAggregationBuilder

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

the class BsFileAuthenticationCA method sampler.

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

Example 28 with SamplerAggregationBuilder

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

the class BsPathMappingCA method sampler.

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

Example 29 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 30 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)

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