Search in sources :

Example 1 with BsDuplicateHostCQ

use of org.codelibs.fess.es.config.cbean.cq.bs.BsDuplicateHostCQ in project fess by codelibs.

the class BsDuplicateHostCA method filter.

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

Aggregations

DuplicateHostCA (org.codelibs.fess.es.config.cbean.ca.DuplicateHostCA)1 DuplicateHostCQ (org.codelibs.fess.es.config.cbean.cq.DuplicateHostCQ)1 BsDuplicateHostCQ (org.codelibs.fess.es.config.cbean.cq.bs.BsDuplicateHostCQ)1 FilterAggregationBuilder (org.opensearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1