@Override
    public String toString() {
        boolean hasAnnotation = !A.empty().equals(annotation);
        String valuesStr;
        switch (relation) {
            case "range":
                valuesStr = values.stream()
                    .map(i -> i instanceof Long ? i + "L" : i.toString())
                    .collect(Collectors.joining(", "));

                return hasAnnotation
                       ? Text.format("([%s]range(%s, %s))", annotation, fieldName, valuesStr)
                       : Text.format("range(%s, %s)", fieldName, valuesStr);
            case "near":
            case "onear":
            case "phrase":
            case "equiv":
            case "uri":
                valuesStr = values.stream().map(Object::toString).collect(Collectors.joining(", "));
                return hasAnnotation
                       ? Text.format("%s contains ([%s]%s(%s))", fieldName, annotation, relation, valuesStr)
                       : Text.format("%s contains %s(%s)", fieldName, relation, valuesStr);
            case "sameElement":
                return Text.format("%s contains %s(%s)", fieldName, relation,
                                     ((Query) values.get(0)).toCommaSeparatedAndQueries());
            case "nearestNeighbor":
                valuesStr = values.stream().map(i -> (String) i).collect(Collectors.joining(", "));

                return hasAnnotation
                    ? Text.format("([%s]nearestNeighbor(%s, %s))", annotation, fieldName, valuesStr)
                    : Text.format("nearestNeighbor(%s, %s)", fieldName, valuesStr);
            case "fuzzy":
                return Text.format("%s contains (%sfuzzy(%s))", fieldName, annotation, values.get(0));
            default:
                Object value = values.get(0);
                valuesStr = value instanceof Long ? value + "L" : value.toString();
                return hasAnnotation
                       ? Text.format("%s %s ([%s]%s)", fieldName, relation, annotation, valuesStr)
                       : Text.format("%s %s %s", fieldName, relation, valuesStr);
        }
    }
Fuzzy query.
https://docs.vespa.ai/en/reference/query-language-reference.html#fuzzy

@param annotation the annotation
@param text the text to match fuzzily
@return the query
client/src/main/java/ai/vespa/client/dsl/Field.java