Search in sources :

Example 1 with BsCrawlingInfoCQ

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

the class BsCrawlingInfoCA method filter.

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

Aggregations

CrawlingInfoCA (org.codelibs.fess.es.config.cbean.ca.CrawlingInfoCA)1 CrawlingInfoCQ (org.codelibs.fess.es.config.cbean.cq.CrawlingInfoCQ)1 BsCrawlingInfoCQ (org.codelibs.fess.es.config.cbean.cq.bs.BsCrawlingInfoCQ)1 FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1