Search in sources :

Example 36 with SamplerAggregationBuilder

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

the class BsDuplicateHostCA method sampler.

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

Example 37 with SamplerAggregationBuilder

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

the class BsElevateWordCA method sampler.

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

Example 38 with SamplerAggregationBuilder

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

the class BsFailureUrlCA method sampler.

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

Example 39 with SamplerAggregationBuilder

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

the class BsFavoriteLogCA method sampler.

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

Example 40 with SamplerAggregationBuilder

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

the class BsSearchFieldLogCA method sampler.

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

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