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