use of org.opensearch.index.query.BoolQueryBuilder in project fess by codelibs.
the class BsClickLogCQ method bool.
public void bool(BoolCall<ClickLogCQ> boolLambda, ConditionOptionCall<BoolQueryBuilder> opLambda) {
ClickLogCQ mustQuery = new ClickLogCQ();
ClickLogCQ shouldQuery = new ClickLogCQ();
ClickLogCQ mustNotQuery = new ClickLogCQ();
ClickLogCQ filterQuery = new ClickLogCQ();
boolLambda.callback(mustQuery, shouldQuery, mustNotQuery, filterQuery);
if (mustQuery.hasQueries() || shouldQuery.hasQueries() || mustNotQuery.hasQueries() || filterQuery.hasQueries()) {
BoolQueryBuilder builder = regBoolCQ(mustQuery.getQueryBuilderList(), shouldQuery.getQueryBuilderList(), mustNotQuery.getQueryBuilderList(), filterQuery.getQueryBuilderList());
if (opLambda != null) {
opLambda.callback(builder);
}
}
}
use of org.opensearch.index.query.BoolQueryBuilder in project fess by codelibs.
the class BsElevateWordToLabelCQ method bool.
public void bool(BoolCall<ElevateWordToLabelCQ> boolLambda, ConditionOptionCall<BoolQueryBuilder> opLambda) {
ElevateWordToLabelCQ mustQuery = new ElevateWordToLabelCQ();
ElevateWordToLabelCQ shouldQuery = new ElevateWordToLabelCQ();
ElevateWordToLabelCQ mustNotQuery = new ElevateWordToLabelCQ();
ElevateWordToLabelCQ filterQuery = new ElevateWordToLabelCQ();
boolLambda.callback(mustQuery, shouldQuery, mustNotQuery, filterQuery);
if (mustQuery.hasQueries() || shouldQuery.hasQueries() || mustNotQuery.hasQueries() || filterQuery.hasQueries()) {
BoolQueryBuilder builder = regBoolCQ(mustQuery.getQueryBuilderList(), shouldQuery.getQueryBuilderList(), mustNotQuery.getQueryBuilderList(), filterQuery.getQueryBuilderList());
if (opLambda != null) {
opLambda.callback(builder);
}
}
}
use of org.opensearch.index.query.BoolQueryBuilder in project fess by codelibs.
the class BsBadWordCQ method bool.
public void bool(BoolCall<BadWordCQ> boolLambda, ConditionOptionCall<BoolQueryBuilder> opLambda) {
BadWordCQ mustQuery = new BadWordCQ();
BadWordCQ shouldQuery = new BadWordCQ();
BadWordCQ mustNotQuery = new BadWordCQ();
BadWordCQ filterQuery = new BadWordCQ();
boolLambda.callback(mustQuery, shouldQuery, mustNotQuery, filterQuery);
if (mustQuery.hasQueries() || shouldQuery.hasQueries() || mustNotQuery.hasQueries() || filterQuery.hasQueries()) {
BoolQueryBuilder builder = regBoolCQ(mustQuery.getQueryBuilderList(), shouldQuery.getQueryBuilderList(), mustNotQuery.getQueryBuilderList(), filterQuery.getQueryBuilderList());
if (opLambda != null) {
opLambda.callback(builder);
}
}
}
use of org.opensearch.index.query.BoolQueryBuilder in project fess by codelibs.
the class BsCrawlingInfoCQ method bool.
public void bool(BoolCall<CrawlingInfoCQ> boolLambda, ConditionOptionCall<BoolQueryBuilder> opLambda) {
CrawlingInfoCQ mustQuery = new CrawlingInfoCQ();
CrawlingInfoCQ shouldQuery = new CrawlingInfoCQ();
CrawlingInfoCQ mustNotQuery = new CrawlingInfoCQ();
CrawlingInfoCQ filterQuery = new CrawlingInfoCQ();
boolLambda.callback(mustQuery, shouldQuery, mustNotQuery, filterQuery);
if (mustQuery.hasQueries() || shouldQuery.hasQueries() || mustNotQuery.hasQueries() || filterQuery.hasQueries()) {
BoolQueryBuilder builder = regBoolCQ(mustQuery.getQueryBuilderList(), shouldQuery.getQueryBuilderList(), mustNotQuery.getQueryBuilderList(), filterQuery.getQueryBuilderList());
if (opLambda != null) {
opLambda.callback(builder);
}
}
}
use of org.opensearch.index.query.BoolQueryBuilder in project fess by codelibs.
the class EsAbstractConditionQuery method getQuery.
public QueryBuilder getQuery() {
if (queryBuilderList == null) {
return null;
} else if (queryBuilderList.size() == 1) {
return queryBuilderList.get(0);
}
BoolQueryBuilder boolQuery = QueryBuilders.boolQuery();
queryBuilderList.forEach(query -> {
boolQuery.must(query);
});
return boolQuery;
}
Aggregations