use of org.opensearch.index.query.functionscore.FunctionScoreQueryBuilder in project fess by codelibs.
the class BsElevateWordToLabelCQ method functionScore.
// ===================================================================================
// Query Control
// =============
public void functionScore(OperatorCall<ElevateWordToLabelCQ> queryLambda, ScoreFunctionCall<ScoreFunctionCreator<ElevateWordToLabelCQ>> functionsLambda, final ConditionOptionCall<FunctionScoreQueryBuilder> opLambda) {
ElevateWordToLabelCQ cq = new ElevateWordToLabelCQ();
queryLambda.callback(cq);
final Collection<FilterFunctionBuilder> list = new ArrayList<>();
if (functionsLambda != null) {
functionsLambda.callback((cqLambda, scoreFunctionBuilder) -> {
ElevateWordToLabelCQ cf = new ElevateWordToLabelCQ();
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 in project fess by codelibs.
the class BsCrawlingInfoParamCQ method functionScore.
// ===================================================================================
// Query Control
// =============
public void functionScore(OperatorCall<CrawlingInfoParamCQ> queryLambda, ScoreFunctionCall<ScoreFunctionCreator<CrawlingInfoParamCQ>> functionsLambda, final ConditionOptionCall<FunctionScoreQueryBuilder> opLambda) {
CrawlingInfoParamCQ cq = new CrawlingInfoParamCQ();
queryLambda.callback(cq);
final Collection<FilterFunctionBuilder> list = new ArrayList<>();
if (functionsLambda != null) {
functionsLambda.callback((cqLambda, scoreFunctionBuilder) -> {
CrawlingInfoParamCQ cf = new CrawlingInfoParamCQ();
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 in project fess by codelibs.
the class BsFileAuthenticationCQ method functionScore.
// ===================================================================================
// Query Control
// =============
public void functionScore(OperatorCall<FileAuthenticationCQ> queryLambda, ScoreFunctionCall<ScoreFunctionCreator<FileAuthenticationCQ>> functionsLambda, final ConditionOptionCall<FunctionScoreQueryBuilder> opLambda) {
FileAuthenticationCQ cq = new FileAuthenticationCQ();
queryLambda.callback(cq);
final Collection<FilterFunctionBuilder> list = new ArrayList<>();
if (functionsLambda != null) {
functionsLambda.callback((cqLambda, scoreFunctionBuilder) -> {
FileAuthenticationCQ cf = new FileAuthenticationCQ();
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 in project fess by codelibs.
the class BsAccessTokenCQ method functionScore.
// ===================================================================================
// Query Control
// =============
public void functionScore(OperatorCall<AccessTokenCQ> queryLambda, ScoreFunctionCall<ScoreFunctionCreator<AccessTokenCQ>> functionsLambda, final ConditionOptionCall<FunctionScoreQueryBuilder> opLambda) {
AccessTokenCQ cq = new AccessTokenCQ();
queryLambda.callback(cq);
final Collection<FilterFunctionBuilder> list = new ArrayList<>();
if (functionsLambda != null) {
functionsLambda.callback((cqLambda, scoreFunctionBuilder) -> {
AccessTokenCQ cf = new AccessTokenCQ();
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 in project fess by codelibs.
the class BsBadWordCQ method functionScore.
// ===================================================================================
// Query Control
// =============
public void functionScore(OperatorCall<BadWordCQ> queryLambda, ScoreFunctionCall<ScoreFunctionCreator<BadWordCQ>> functionsLambda, final ConditionOptionCall<FunctionScoreQueryBuilder> opLambda) {
BadWordCQ cq = new BadWordCQ();
queryLambda.callback(cq);
final Collection<FilterFunctionBuilder> list = new ArrayList<>();
if (functionsLambda != null) {
functionsLambda.callback((cqLambda, scoreFunctionBuilder) -> {
BadWordCQ cf = new BadWordCQ();
cqLambda.callback(cf);
list.add(new FilterFunctionBuilder(cf.getQuery(), scoreFunctionBuilder));
});
}
final FunctionScoreQueryBuilder builder = regFunctionScoreQ(cq.getQuery(), list);
if (opLambda != null) {
opLambda.callback(builder);
}
}
Aggregations