Search in sources :

Example 6 with BoolQueryBuilder

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

the class BsRelatedContentCQ method bool.

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

Example 7 with BoolQueryBuilder

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

the class BsGroupCQ method bool.

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

Example 8 with BoolQueryBuilder

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

the class BsSearchLogCQ method bool.

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

Example 9 with BoolQueryBuilder

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

the class BsFavoriteLogCQ method bool.

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

Example 10 with BoolQueryBuilder

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

the class BsCrawlingInfoParamCQ method bool.

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

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