use of org.opensearch.index.query.functionscore.FunctionScoreQueryBuilder.FilterFunctionBuilder in project fess by codelibs.
the class BsThumbnailQueueCQ method functionScore.
// ===================================================================================
// Query Control
// =============
public void functionScore(OperatorCall<ThumbnailQueueCQ> queryLambda, ScoreFunctionCall<ScoreFunctionCreator<ThumbnailQueueCQ>> functionsLambda, final ConditionOptionCall<FunctionScoreQueryBuilder> opLambda) {
ThumbnailQueueCQ cq = new ThumbnailQueueCQ();
queryLambda.callback(cq);
final Collection<FilterFunctionBuilder> list = new ArrayList<>();
if (functionsLambda != null) {
functionsLambda.callback((cqLambda, scoreFunctionBuilder) -> {
ThumbnailQueueCQ cf = new ThumbnailQueueCQ();
cqLambda.callback(cf);
list.add(new FilterFunctionBuilder(cf.getQuery(), scoreFunctionBuilder));
});
}
final FunctionScoreQueryBuilder builder = regFunctionScoreQ(cq.getQuery(), list);
if (opLambda != null) {
opLambda.callback(builder);
}
}
use of org.opensearch.index.query.functionscore.FunctionScoreQueryBuilder.FilterFunctionBuilder in project fess by codelibs.
the class BsRelatedQueryCQ method functionScore.
// ===================================================================================
// Query Control
// =============
public void functionScore(OperatorCall<RelatedQueryCQ> queryLambda, ScoreFunctionCall<ScoreFunctionCreator<RelatedQueryCQ>> functionsLambda, final ConditionOptionCall<FunctionScoreQueryBuilder> opLambda) {
RelatedQueryCQ cq = new RelatedQueryCQ();
queryLambda.callback(cq);
final Collection<FilterFunctionBuilder> list = new ArrayList<>();
if (functionsLambda != null) {
functionsLambda.callback((cqLambda, scoreFunctionBuilder) -> {
RelatedQueryCQ cf = new RelatedQueryCQ();
cqLambda.callback(cf);
list.add(new FilterFunctionBuilder(cf.getQuery(), scoreFunctionBuilder));
});
}
final FunctionScoreQueryBuilder builder = regFunctionScoreQ(cq.getQuery(), list);
if (opLambda != null) {
opLambda.callback(builder);
}
}
use of org.opensearch.index.query.functionscore.FunctionScoreQueryBuilder.FilterFunctionBuilder in project fess by codelibs.
the class BsScheduledJobCQ method functionScore.
// ===================================================================================
// Query Control
// =============
public void functionScore(OperatorCall<ScheduledJobCQ> queryLambda, ScoreFunctionCall<ScoreFunctionCreator<ScheduledJobCQ>> functionsLambda, final ConditionOptionCall<FunctionScoreQueryBuilder> opLambda) {
ScheduledJobCQ cq = new ScheduledJobCQ();
queryLambda.callback(cq);
final Collection<FilterFunctionBuilder> list = new ArrayList<>();
if (functionsLambda != null) {
functionsLambda.callback((cqLambda, scoreFunctionBuilder) -> {
ScheduledJobCQ cf = new ScheduledJobCQ();
cqLambda.callback(cf);
list.add(new FilterFunctionBuilder(cf.getQuery(), scoreFunctionBuilder));
});
}
final FunctionScoreQueryBuilder builder = regFunctionScoreQ(cq.getQuery(), list);
if (opLambda != null) {
opLambda.callback(builder);
}
}
use of org.opensearch.index.query.functionscore.FunctionScoreQueryBuilder.FilterFunctionBuilder in project fess by codelibs.
the class BsUserCQ method functionScore.
// ===================================================================================
// Query Control
// =============
public void functionScore(OperatorCall<UserCQ> queryLambda, ScoreFunctionCall<ScoreFunctionCreator<UserCQ>> functionsLambda, final ConditionOptionCall<FunctionScoreQueryBuilder> opLambda) {
UserCQ cq = new UserCQ();
queryLambda.callback(cq);
final Collection<FilterFunctionBuilder> list = new ArrayList<>();
if (functionsLambda != null) {
functionsLambda.callback((cqLambda, scoreFunctionBuilder) -> {
UserCQ cf = new UserCQ();
cqLambda.callback(cf);
list.add(new FilterFunctionBuilder(cf.getQuery(), scoreFunctionBuilder));
});
}
final FunctionScoreQueryBuilder builder = regFunctionScoreQ(cq.getQuery(), list);
if (opLambda != null) {
opLambda.callback(builder);
}
}
use of org.opensearch.index.query.functionscore.FunctionScoreQueryBuilder.FilterFunctionBuilder in project fess by codelibs.
the class BsSearchLogCQ method functionScore.
// ===================================================================================
// Query Control
// =============
public void functionScore(OperatorCall<SearchLogCQ> queryLambda, ScoreFunctionCall<ScoreFunctionCreator<SearchLogCQ>> functionsLambda, final ConditionOptionCall<FunctionScoreQueryBuilder> opLambda) {
SearchLogCQ cq = new SearchLogCQ();
queryLambda.callback(cq);
final Collection<FilterFunctionBuilder> list = new ArrayList<>();
if (functionsLambda != null) {
functionsLambda.callback((cqLambda, scoreFunctionBuilder) -> {
SearchLogCQ cf = new SearchLogCQ();
cqLambda.callback(cf);
list.add(new FilterFunctionBuilder(cf.getQuery(), scoreFunctionBuilder));
});
}
final FunctionScoreQueryBuilder builder = regFunctionScoreQ(cq.getQuery(), list);
if (opLambda != null) {
opLambda.callback(builder);
}
}
Aggregations