Search in sources :

Example 1 with BsAccessTokenCQ

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

the class BsAccessTokenCA method filter.

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

Aggregations

AccessTokenCA (org.codelibs.fess.es.config.cbean.ca.AccessTokenCA)1 AccessTokenCQ (org.codelibs.fess.es.config.cbean.cq.AccessTokenCQ)1 BsAccessTokenCQ (org.codelibs.fess.es.config.cbean.cq.bs.BsAccessTokenCQ)1 FilterAggregationBuilder (org.opensearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1