@Override
    public void process(boolean validate, boolean documentsOnly) {
        for (SDField field : schema.allConcreteFields()) {
            if (field.getMatching().getType().equals(MatchType.GRAM))
                implementGramMatch(schema, field, validate);
            else if (validate && field.getMatching().getGramSize().isPresent())
                throw new IllegalArgumentException("gram-size can only be set when the matching mode is 'gram'");
        }
    }
The implementation of "gram" matching - splitting the incoming text and the queries into
n-grams for matching. This will also validate the gram settings.

@author bratseth
config-model/src/main/java/com/yahoo/schema/processing/NGramMatch.java