Search in sources :

Example 1 with BsRelatedContentCQ

use of org.codelibs.fess.es.config.cbean.cq.bs.BsRelatedContentCQ 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)

Aggregations

RelatedContentCA (org.codelibs.fess.es.config.cbean.ca.RelatedContentCA)1 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