Search in sources :

Example 1 with BsBoostDocumentRuleCQ

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

the class BsBoostDocumentRuleCA method filter.

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

Aggregations

BoostDocumentRuleCA (org.codelibs.fess.es.config.cbean.ca.BoostDocumentRuleCA)1 BoostDocumentRuleCQ (org.codelibs.fess.es.config.cbean.cq.BoostDocumentRuleCQ)1 BsBoostDocumentRuleCQ (org.codelibs.fess.es.config.cbean.cq.bs.BsBoostDocumentRuleCQ)1 FilterAggregationBuilder (org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder)1