private Result evaluateString(Object lhs, Object rhs) {
        String left = "" + lhs; // Allows null objects to evaluate to string.
        String right = "" + rhs;
        if (operator.equals("=~")) {
            return Result.toResult(Pattern.compile(right).matcher(left).find());
        } else {
            return Result.toResult(Pattern.compile(globToRegex(right)).matcher(left).find());
        }
    }
Evalutes the value of this term over a document, given that both operands must be strings.

@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