private void checkMatching(Schema schema, SDField field, Map<String, MatchType> types, String indexTo) {
        MatchType prevType = types.get(indexTo);
        if (prevType == null) {
            types.put(indexTo, field.getMatching().getType());
        } else if ( ! field.getMatching().getType().equals(prevType)) {
            warn(schema, field, "The matching type for index '" + indexTo + "' (got " + field.getMatching().getType() +
                                ") is inconsistent with that given for the same index in a previous field (had " +
                                prevType + ").");
        }
    }
Warn on inconsistent match settings for any index

@author vegardh
config-model/src/main/java/com/yahoo/schema/processing/MatchConsistency.java