public void merge(Matching m) {
        if (m == null) return;
        if (m.isAlgorithmUserSet()) {
            this.setAlgorithm(m.getAlgorithm());
        }
        if (m.isTypeUserSet()) {
            this.setType(m.getType());
            if (m.getType() == MatchType.GRAM)
              gramSize = m.gramSize;
        }
        if (m.getExactMatchTerminator() != null) {
            this.setExactMatchTerminator(m.getExactMatchTerminator());
        }
    }
Merge data from another matching object
config-model/src/main/java/com/yahoo/schema/document/Matching.java