Search in sources :

Example 31 with FilterAggregationBuilder

use of org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder in project fess by codelibs.

the class BsClickLogCA method filter.

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

Example 32 with FilterAggregationBuilder

use of org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder in project fess by codelibs.

the class BsCrawlingInfoParamCA method filter.

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

Example 33 with FilterAggregationBuilder

use of org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder in project fess by codelibs.

the class BsFileConfigToLabelCA method filter.

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

Example 34 with FilterAggregationBuilder

use of org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder in project fess by codelibs.

the class BsFileConfigToRoleCA method filter.

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

Example 35 with FilterAggregationBuilder

use of org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder in project fess by codelibs.

the class BsFileConfigCA method filter.

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

Aggregations

FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)52 SearchRequest (org.elasticsearch.action.search.SearchRequest)6 SearchRequestBuilder (org.elasticsearch.action.search.SearchRequestBuilder)6 SearchResponse (org.elasticsearch.action.search.SearchResponse)6 Filter (org.elasticsearch.search.aggregations.bucket.filter.Filter)6 BoolQueryBuilder (org.elasticsearch.index.query.BoolQueryBuilder)5 Terms (org.elasticsearch.search.aggregations.bucket.terms.Terms)4 QueryBuilder (org.elasticsearch.index.query.QueryBuilder)2 StickyFacetBuilder (org.sonar.server.es.StickyFacetBuilder)2 ImmutableList (com.google.common.collect.ImmutableList)1 IOException (java.io.IOException)1 Arrays (java.util.Arrays)1 Map (java.util.Map)1 Objects (java.util.Objects)1 Collector (java.util.stream.Collector)1 Collectors (java.util.stream.Collectors)1 Nullable (javax.annotation.Nullable)1 ArrayUtils (org.apache.commons.lang.ArrayUtils)1 AccessTokenCA (org.codelibs.fess.es.config.cbean.ca.AccessTokenCA)1 BadWordCA (org.codelibs.fess.es.config.cbean.ca.BadWordCA)1