private Object recombineNGramsField(Object fieldValue,int gramSize) {
        String recombined = recombineNGrams(fieldValue.toString(),gramSize);
        if (fieldValue instanceof JSONString)
            return new JSONString(recombined);
        else if (fieldValue instanceof XMLString)
            return new XMLString(recombined);
        else
            return recombined;
    }
Creates the root of the query subtree without access to the term being replaced.
container-search/src/main/java/com/yahoo/search/querytransform/NGramSearcher.java