Search in sources :

Example 1 with BsSearchFieldLogCQ

use of org.codelibs.fess.es.log.cbean.cq.bs.BsSearchFieldLogCQ in project fess by codelibs.

the class BsSearchFieldLogCA method filter.

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

Aggregations

SearchFieldLogCA (org.codelibs.fess.es.log.cbean.ca.SearchFieldLogCA)1 SearchFieldLogCQ (org.codelibs.fess.es.log.cbean.cq.SearchFieldLogCQ)1 BsSearchFieldLogCQ (org.codelibs.fess.es.log.cbean.cq.bs.BsSearchFieldLogCQ)1 FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1