use of org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder in project fess by codelibs.
the class BsFileConfigCQ method functionScore.
// ===================================================================================
// Query Control
// =============
public void functionScore(OperatorCall<FileConfigCQ> queryLambda, ScoreFunctionCall<ScoreFunctionCreator<FileConfigCQ>> functionsLambda, final ConditionOptionCall<FunctionScoreQueryBuilder> opLambda) {
FileConfigCQ cq = new FileConfigCQ();
queryLambda.callback(cq);
final Collection<FilterFunctionBuilder> list = new ArrayList<>();
if (functionsLambda != null) {
functionsLambda.callback((cqLambda, scoreFunctionBuilder) -> {
FileConfigCQ cf = new FileConfigCQ();
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.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder 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.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder 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.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder in project fess by codelibs.
the class BsWebAuthenticationCQ method functionScore.
// ===================================================================================
// Query Control
// =============
public void functionScore(OperatorCall<WebAuthenticationCQ> queryLambda, ScoreFunctionCall<ScoreFunctionCreator<WebAuthenticationCQ>> functionsLambda, final ConditionOptionCall<FunctionScoreQueryBuilder> opLambda) {
WebAuthenticationCQ cq = new WebAuthenticationCQ();
queryLambda.callback(cq);
final Collection<FilterFunctionBuilder> list = new ArrayList<>();
if (functionsLambda != null) {
functionsLambda.callback((cqLambda, scoreFunctionBuilder) -> {
WebAuthenticationCQ cf = new WebAuthenticationCQ();
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.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder in project fess by codelibs.
the class BsWebConfigCQ method functionScore.
// ===================================================================================
// Query Control
// =============
public void functionScore(OperatorCall<WebConfigCQ> queryLambda, ScoreFunctionCall<ScoreFunctionCreator<WebConfigCQ>> functionsLambda, final ConditionOptionCall<FunctionScoreQueryBuilder> opLambda) {
WebConfigCQ cq = new WebConfigCQ();
queryLambda.callback(cq);
final Collection<FilterFunctionBuilder> list = new ArrayList<>();
if (functionsLambda != null) {
functionsLambda.callback((cqLambda, scoreFunctionBuilder) -> {
WebConfigCQ cf = new WebConfigCQ();
cqLambda.callback(cf);
list.add(new FilterFunctionBuilder(cf.getQuery(), scoreFunctionBuilder));
});
}
final FunctionScoreQueryBuilder builder = regFunctionScoreQ(cq.getQuery(), list);
if (opLambda != null) {
opLambda.callback(builder);
}
}
Aggregations