use of org.opensearch.search.aggregations.bucket.filter.FilterAggregationBuilder in project fess by codelibs.
the class BsPathMappingCA method filter.
// ===================================================================================
// Aggregation Set
// =========
public void filter(String name, EsAbstractConditionQuery.OperatorCall<BsPathMappingCQ> queryLambda, ConditionOptionCall<FilterAggregationBuilder> opLambda, OperatorCall<BsPathMappingCA> aggsLambda) {
PathMappingCQ cq = new PathMappingCQ();
if (queryLambda != null) {
queryLambda.callback(cq);
}
FilterAggregationBuilder builder = regFilterA(name, cq.getQuery());
if (opLambda != null) {
opLambda.callback(builder);
}
if (aggsLambda != null) {
PathMappingCA ca = new PathMappingCA();
aggsLambda.callback(ca);
ca.getAggregationBuilderList().forEach(builder::subAggregation);
}
}
use of org.opensearch.search.aggregations.bucket.filter.FilterAggregationBuilder in project fess by codelibs.
the class BsLabelTypeCA method filter.
// ===================================================================================
// Aggregation Set
// =========
public void filter(String name, EsAbstractConditionQuery.OperatorCall<BsLabelTypeCQ> queryLambda, ConditionOptionCall<FilterAggregationBuilder> opLambda, OperatorCall<BsLabelTypeCA> aggsLambda) {
LabelTypeCQ cq = new LabelTypeCQ();
if (queryLambda != null) {
queryLambda.callback(cq);
}
FilterAggregationBuilder builder = regFilterA(name, cq.getQuery());
if (opLambda != null) {
opLambda.callback(builder);
}
if (aggsLambda != null) {
LabelTypeCA ca = new LabelTypeCA();
aggsLambda.callback(ca);
ca.getAggregationBuilderList().forEach(builder::subAggregation);
}
}
use of org.opensearch.search.aggregations.bucket.filter.FilterAggregationBuilder in project fess by codelibs.
the class BsJobLogCA method filter.
// ===================================================================================
// Aggregation Set
// =========
public void filter(String name, EsAbstractConditionQuery.OperatorCall<BsJobLogCQ> queryLambda, ConditionOptionCall<FilterAggregationBuilder> opLambda, OperatorCall<BsJobLogCA> aggsLambda) {
JobLogCQ cq = new JobLogCQ();
if (queryLambda != null) {
queryLambda.callback(cq);
}
FilterAggregationBuilder builder = regFilterA(name, cq.getQuery());
if (opLambda != null) {
opLambda.callback(builder);
}
if (aggsLambda != null) {
JobLogCA ca = new JobLogCA();
aggsLambda.callback(ca);
ca.getAggregationBuilderList().forEach(builder::subAggregation);
}
}
use of org.opensearch.search.aggregations.bucket.filter.FilterAggregationBuilder in project fess by codelibs.
the class BsRoleTypeCA method filter.
// ===================================================================================
// Aggregation Set
// =========
public void filter(String name, EsAbstractConditionQuery.OperatorCall<BsRoleTypeCQ> queryLambda, ConditionOptionCall<FilterAggregationBuilder> opLambda, OperatorCall<BsRoleTypeCA> aggsLambda) {
RoleTypeCQ cq = new RoleTypeCQ();
if (queryLambda != null) {
queryLambda.callback(cq);
}
FilterAggregationBuilder builder = regFilterA(name, cq.getQuery());
if (opLambda != null) {
opLambda.callback(builder);
}
if (aggsLambda != null) {
RoleTypeCA ca = new RoleTypeCA();
aggsLambda.callback(ca);
ca.getAggregationBuilderList().forEach(builder::subAggregation);
}
}
use of org.opensearch.search.aggregations.bucket.filter.FilterAggregationBuilder in project fess by codelibs.
the class EsAbstractConditionAggregation method regFilterA.
protected FilterAggregationBuilder regFilterA(String name, QueryBuilder filter) {
FilterAggregationBuilder builder = AggregationBuilders.filter(name, filter);
regA(builder);
return builder;
}
Aggregations