Search in sources :

Example 1 with FilterAggregationBuilder

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

the class BsPathMappingCA method filter.

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

Example 2 with FilterAggregationBuilder

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

the class BsLabelTypeCA method filter.

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

Example 3 with FilterAggregationBuilder

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

the class BsJobLogCA method filter.

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

Example 4 with FilterAggregationBuilder

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

the class BsRoleTypeCA method filter.

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

Example 5 with FilterAggregationBuilder

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

the class EsAbstractConditionAggregation method regFilterA.

protected FilterAggregationBuilder regFilterA(String name, QueryBuilder filter) {
    FilterAggregationBuilder builder = AggregationBuilders.filter(name, filter);
    regA(builder);
    return builder;
}
Also used : FilterAggregationBuilder(org.opensearch.search.aggregations.bucket.filter.FilterAggregationBuilder)

Aggregations

FilterAggregationBuilder (org.opensearch.search.aggregations.bucket.filter.FilterAggregationBuilder)34 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 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 JobLogCA (org.codelibs.fess.es.config.cbean.ca.JobLogCA)1 KeyMatchCA (org.codelibs.fess.es.config.cbean.ca.KeyMatchCA)1 LabelTypeCA (org.codelibs.fess.es.config.cbean.ca.LabelTypeCA)1 PathMappingCA (org.codelibs.fess.es.config.cbean.ca.PathMappingCA)1 RelatedContentCA (org.codelibs.fess.es.config.cbean.ca.RelatedContentCA)1 RelatedQueryCA (org.codelibs.fess.es.config.cbean.ca.RelatedQueryCA)1 RequestHeaderCA (org.codelibs.fess.es.config.cbean.ca.RequestHeaderCA)1