Search in sources :

Example 41 with BoolQueryBuilder

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

the class BsJobLogCQ method bool.

public void bool(BoolCall<JobLogCQ> boolLambda, ConditionOptionCall<BoolQueryBuilder> opLambda) {
    JobLogCQ mustQuery = new JobLogCQ();
    JobLogCQ shouldQuery = new JobLogCQ();
    JobLogCQ mustNotQuery = new JobLogCQ();
    JobLogCQ filterQuery = new JobLogCQ();
    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);
        }
    }
}
Also used : BoolQueryBuilder(org.opensearch.index.query.BoolQueryBuilder) JobLogCQ(org.codelibs.fess.es.config.cbean.cq.JobLogCQ)

Example 42 with BoolQueryBuilder

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

the class BsElevateWordCQ method bool.

public void bool(BoolCall<ElevateWordCQ> boolLambda, ConditionOptionCall<BoolQueryBuilder> opLambda) {
    ElevateWordCQ mustQuery = new ElevateWordCQ();
    ElevateWordCQ shouldQuery = new ElevateWordCQ();
    ElevateWordCQ mustNotQuery = new ElevateWordCQ();
    ElevateWordCQ filterQuery = new ElevateWordCQ();
    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);
        }
    }
}
Also used : BoolQueryBuilder(org.opensearch.index.query.BoolQueryBuilder) ElevateWordCQ(org.codelibs.fess.es.config.cbean.cq.ElevateWordCQ)

Example 43 with BoolQueryBuilder

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

the class BsUserCQ method bool.

public void bool(BoolCall<UserCQ> boolLambda, ConditionOptionCall<BoolQueryBuilder> opLambda) {
    UserCQ mustQuery = new UserCQ();
    UserCQ shouldQuery = new UserCQ();
    UserCQ mustNotQuery = new UserCQ();
    UserCQ filterQuery = new UserCQ();
    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);
        }
    }
}
Also used : BoolQueryBuilder(org.opensearch.index.query.BoolQueryBuilder) UserCQ(org.codelibs.fess.es.user.cbean.cq.UserCQ)

Aggregations

BoolQueryBuilder (org.opensearch.index.query.BoolQueryBuilder)43 FessConfig (org.codelibs.fess.mylasta.direction.FessConfig)3 ArrayList (java.util.ArrayList)1 Collections (java.util.Collections)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Locale (java.util.Locale)1 Map (java.util.Map)1 PostConstruct (javax.annotation.PostConstruct)1 LogManager (org.apache.logging.log4j.LogManager)1 Logger (org.apache.logging.log4j.Logger)1 StringUtil (org.codelibs.core.lang.StringUtil)1 Tuple3 (org.codelibs.core.misc.Tuple3)1 Constants (org.codelibs.fess.Constants)1 SearchRequestType (org.codelibs.fess.entity.SearchRequestParams.SearchRequestType)1 SearchEngineClient (org.codelibs.fess.es.client.SearchEngineClient)1 SearchConditionBuilder (org.codelibs.fess.es.client.SearchEngineClient.SearchConditionBuilder)1 AccessTokenCQ (org.codelibs.fess.es.config.cbean.cq.AccessTokenCQ)1 BadWordCQ (org.codelibs.fess.es.config.cbean.cq.BadWordCQ)1 BoostDocumentRuleCQ (org.codelibs.fess.es.config.cbean.cq.BoostDocumentRuleCQ)1