private Result evaluateNumber(Object lhs, Object rhs) {
        double a = getAsNumber(lhs);
        double b = getAsNumber(rhs);
        if (Double.isNaN(a) || Double.isNaN(b)) {
            return Result.INVALID;
        }
        if (operator.equals("<")) {
            return Result.toResult(a < b);
        } else if (operator.equals("<=")) {
            return Result.toResult(a <= b);
        } else if (operator.equals(">")) {
            return Result.toResult(a > b);
        } else {
            return Result.toResult(a >= b);
        }
    }
Evalutes the value of this term over a document, given that both operands must be numbers.

@param lhs Left hand side of operation.
@param rhs Right hand side of operation.
@return The evaluation result.
document/src/main/java/com/yahoo/document/select/rule/ComparisonNode.java