Search in sources :

Example 16 with RelatedContentCA

use of org.codelibs.fess.es.config.cbean.ca.RelatedContentCA in project fess by codelibs.

the class BsRelatedContentCA method filter.

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

Example 17 with RelatedContentCA

use of org.codelibs.fess.es.config.cbean.ca.RelatedContentCA in project fess by codelibs.

the class BsRelatedContentCA method setCreatedTime_Range.

public void setCreatedTime_Range(String name, ConditionOptionCall<RangeAggregationBuilder> opLambda, OperatorCall<BsRelatedContentCA> aggsLambda) {
    RangeAggregationBuilder builder = regRangeA(name, "createdTime");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
    if (aggsLambda != null) {
        RelatedContentCA ca = new RelatedContentCA();
        aggsLambda.callback(ca);
        ca.getAggregationBuilderList().forEach(builder::subAggregation);
    }
}
Also used : RelatedContentCA(org.codelibs.fess.es.config.cbean.ca.RelatedContentCA) RangeAggregationBuilder(org.opensearch.search.aggregations.bucket.range.RangeAggregationBuilder) IpRangeAggregationBuilder(org.opensearch.search.aggregations.bucket.range.IpRangeAggregationBuilder)

Example 18 with RelatedContentCA

use of org.codelibs.fess.es.config.cbean.ca.RelatedContentCA in project fess by codelibs.

the class BsRelatedContentCA method setTerm_SignificantTerms.

public void setTerm_SignificantTerms(String name, ConditionOptionCall<SignificantTermsAggregationBuilder> opLambda, OperatorCall<BsRelatedContentCA> aggsLambda) {
    SignificantTermsAggregationBuilder builder = regSignificantTermsA(name, "term");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
    if (aggsLambda != null) {
        RelatedContentCA ca = new RelatedContentCA();
        aggsLambda.callback(ca);
        ca.getAggregationBuilderList().forEach(builder::subAggregation);
    }
}
Also used : RelatedContentCA(org.codelibs.fess.es.config.cbean.ca.RelatedContentCA) SignificantTermsAggregationBuilder(org.opensearch.search.aggregations.bucket.terms.SignificantTermsAggregationBuilder)

Example 19 with RelatedContentCA

use of org.codelibs.fess.es.config.cbean.ca.RelatedContentCA in project fess by codelibs.

the class BsRelatedContentCA method setTerm_Missing.

public void setTerm_Missing(String name, ConditionOptionCall<MissingAggregationBuilder> opLambda, OperatorCall<BsRelatedContentCA> aggsLambda) {
    MissingAggregationBuilder builder = regMissingA(name, "term");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
    if (aggsLambda != null) {
        RelatedContentCA ca = new RelatedContentCA();
        aggsLambda.callback(ca);
        ca.getAggregationBuilderList().forEach(builder::subAggregation);
    }
}
Also used : RelatedContentCA(org.codelibs.fess.es.config.cbean.ca.RelatedContentCA) MissingAggregationBuilder(org.opensearch.search.aggregations.bucket.missing.MissingAggregationBuilder)

Example 20 with RelatedContentCA

use of org.codelibs.fess.es.config.cbean.ca.RelatedContentCA in project fess by codelibs.

the class BsRelatedContentCA method setUpdatedBy_Missing.

public void setUpdatedBy_Missing(String name, ConditionOptionCall<MissingAggregationBuilder> opLambda, OperatorCall<BsRelatedContentCA> aggsLambda) {
    MissingAggregationBuilder builder = regMissingA(name, "updatedBy");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
    if (aggsLambda != null) {
        RelatedContentCA ca = new RelatedContentCA();
        aggsLambda.callback(ca);
        ca.getAggregationBuilderList().forEach(builder::subAggregation);
    }
}
Also used : RelatedContentCA(org.codelibs.fess.es.config.cbean.ca.RelatedContentCA) MissingAggregationBuilder(org.opensearch.search.aggregations.bucket.missing.MissingAggregationBuilder)

Aggregations

RelatedContentCA (org.codelibs.fess.es.config.cbean.ca.RelatedContentCA)32 SignificantTermsAggregationBuilder (org.opensearch.search.aggregations.bucket.terms.SignificantTermsAggregationBuilder)10 MissingAggregationBuilder (org.opensearch.search.aggregations.bucket.missing.MissingAggregationBuilder)8 IpRangeAggregationBuilder (org.opensearch.search.aggregations.bucket.range.IpRangeAggregationBuilder)8 TermsAggregationBuilder (org.opensearch.search.aggregations.bucket.terms.TermsAggregationBuilder)5 HistogramAggregationBuilder (org.opensearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder)3 RangeAggregationBuilder (org.opensearch.search.aggregations.bucket.range.RangeAggregationBuilder)3 RelatedContentCQ (org.codelibs.fess.es.config.cbean.cq.RelatedContentCQ)1 BsRelatedContentCQ (org.codelibs.fess.es.config.cbean.cq.bs.BsRelatedContentCQ)1 FilterAggregationBuilder (org.opensearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1 GlobalAggregationBuilder (org.opensearch.search.aggregations.bucket.global.GlobalAggregationBuilder)1 SamplerAggregationBuilder (org.opensearch.search.aggregations.bucket.sampler.SamplerAggregationBuilder)1