Search in sources :

Example 1 with MultiArgFunctionNode

use of com.yahoo.searchlib.expression.MultiArgFunctionNode in project vespa by vespa-engine.

the class ExpressionConverter method toSubNode.

private MultiArgFunctionNode toSubNode(Iterable<GroupingExpression> lst) {
    MultiArgFunctionNode ret = new AddFunctionNode();
    int i = 0;
    for (GroupingExpression exp : lst) {
        ExpressionNode node = toExpressionNode(exp);
        if (++i > 1) {
            node = new NegateFunctionNode(node);
        }
        ret.addArg(node);
    }
    return ret;
}
Also used : MultiArgFunctionNode(com.yahoo.searchlib.expression.MultiArgFunctionNode) AddFunctionNode(com.yahoo.searchlib.expression.AddFunctionNode) NegateFunctionNode(com.yahoo.searchlib.expression.NegateFunctionNode) GroupingExpression(com.yahoo.search.grouping.request.GroupingExpression) ExpressionNode(com.yahoo.searchlib.expression.ExpressionNode)

Aggregations

GroupingExpression (com.yahoo.search.grouping.request.GroupingExpression)1 AddFunctionNode (com.yahoo.searchlib.expression.AddFunctionNode)1 ExpressionNode (com.yahoo.searchlib.expression.ExpressionNode)1 MultiArgFunctionNode (com.yahoo.searchlib.expression.MultiArgFunctionNode)1 NegateFunctionNode (com.yahoo.searchlib.expression.NegateFunctionNode)1