Search in sources :

Example 11 with BoolQueryBuilder

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

the class BsDataConfigCQ method bool.

public void bool(BoolCall<DataConfigCQ> boolLambda, ConditionOptionCall<BoolQueryBuilder> opLambda) {
    DataConfigCQ mustQuery = new DataConfigCQ();
    DataConfigCQ shouldQuery = new DataConfigCQ();
    DataConfigCQ mustNotQuery = new DataConfigCQ();
    DataConfigCQ filterQuery = new DataConfigCQ();
    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) DataConfigCQ(org.codelibs.fess.es.config.cbean.cq.DataConfigCQ)

Example 12 with BoolQueryBuilder

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

the class BsBoostDocumentRuleCQ method bool.

public void bool(BoolCall<BoostDocumentRuleCQ> boolLambda, ConditionOptionCall<BoolQueryBuilder> opLambda) {
    BoostDocumentRuleCQ mustQuery = new BoostDocumentRuleCQ();
    BoostDocumentRuleCQ shouldQuery = new BoostDocumentRuleCQ();
    BoostDocumentRuleCQ mustNotQuery = new BoostDocumentRuleCQ();
    BoostDocumentRuleCQ filterQuery = new BoostDocumentRuleCQ();
    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) BoostDocumentRuleCQ(org.codelibs.fess.es.config.cbean.cq.BoostDocumentRuleCQ)

Example 13 with BoolQueryBuilder

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

the class BsFileAuthenticationCQ method bool.

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

Example 14 with BoolQueryBuilder

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

the class BsAccessTokenCQ method bool.

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

Example 15 with BoolQueryBuilder

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

the class BsDuplicateHostCQ method bool.

public void bool(BoolCall<DuplicateHostCQ> boolLambda, ConditionOptionCall<BoolQueryBuilder> opLambda) {
    DuplicateHostCQ mustQuery = new DuplicateHostCQ();
    DuplicateHostCQ shouldQuery = new DuplicateHostCQ();
    DuplicateHostCQ mustNotQuery = new DuplicateHostCQ();
    DuplicateHostCQ filterQuery = new DuplicateHostCQ();
    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) DuplicateHostCQ(org.codelibs.fess.es.config.cbean.cq.DuplicateHostCQ)

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