Search in sources :

Example 1 with MatchAllQueryBuilder

use of org.opensearch.index.query.MatchAllQueryBuilder in project fess by codelibs.

the class EsAbstractConditionQuery method doMatchAll.

protected void doMatchAll(ConditionOptionCall<MatchAllQueryBuilder> opLambda) {
    MatchAllQueryBuilder builder = QueryBuilders.matchAllQuery();
    regQ(builder);
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
Also used : MatchAllQueryBuilder(org.opensearch.index.query.MatchAllQueryBuilder)

Example 2 with MatchAllQueryBuilder

use of org.opensearch.index.query.MatchAllQueryBuilder in project fess by codelibs.

the class EsAbstractConditionQuery method doMatchAll.

protected void doMatchAll(ConditionOptionCall<MatchAllQueryBuilder> opLambda) {
    MatchAllQueryBuilder builder = QueryBuilders.matchAllQuery();
    regQ(builder);
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
Also used : MatchAllQueryBuilder(org.opensearch.index.query.MatchAllQueryBuilder)

Example 3 with MatchAllQueryBuilder

use of org.opensearch.index.query.MatchAllQueryBuilder in project fess by codelibs.

the class QueryContext method addQuery.

public void addQuery(final Consumer<BoolQueryBuilder> boolQuery) {
    BoolQueryBuilder builder;
    if (queryBuilder instanceof MatchAllQueryBuilder) {
        builder = QueryBuilders.boolQuery();
    } else {
        builder = QueryBuilders.boolQuery().must(queryBuilder);
    }
    boolQuery.accept(builder);
    if (builder.hasClauses()) {
        queryBuilder = builder;
    }
}
Also used : BoolQueryBuilder(org.opensearch.index.query.BoolQueryBuilder) MatchAllQueryBuilder(org.opensearch.index.query.MatchAllQueryBuilder)

Example 4 with MatchAllQueryBuilder

use of org.opensearch.index.query.MatchAllQueryBuilder in project fess by codelibs.

the class EsAbstractConditionQuery method doMatchAll.

protected void doMatchAll(ConditionOptionCall<MatchAllQueryBuilder> opLambda) {
    MatchAllQueryBuilder builder = QueryBuilders.matchAllQuery();
    regQ(builder);
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
Also used : MatchAllQueryBuilder(org.opensearch.index.query.MatchAllQueryBuilder)

Aggregations

MatchAllQueryBuilder (org.opensearch.index.query.MatchAllQueryBuilder)4 BoolQueryBuilder (org.opensearch.index.query.BoolQueryBuilder)1