private void implementExactMatch(SDField field, Schema schema) {
        field.setStemming(Stemming.NONE);
        field.getNormalizing().inferLowercase();

        if (field.getMatching().getType().equals(MatchType.WORD)) {
            field.addQueryCommand("word");
        } else { // exact
            String exactTerminator = DEFAULT_EXACT_TERMINATOR;
            if (field.getMatching().getExactMatchTerminator() != null
                && !field.getMatching().getExactMatchTerminator().isEmpty()) {
                exactTerminator = field.getMatching().getExactMatchTerminator();
            } else {
                info(schema, field,
                     "With 'exact' matching, an exact-terminator is needed," +
                     " using default value '" + exactTerminator +"' as terminator");
            }
            field.addQueryCommand("exact " + exactTerminator);

            // The following part illustrates how nice it would have been with canonical representation of indices
            if (field.doesIndexing()) {
                exactMatchSettingsForField(field);
            }
        }
        ScriptExpression script = field.getIndexingScript();
        if (new ExpressionSearcher<>(IndexExpression.class).containedIn(script)) {

            var exactTransformer = new ExactScriptTransformer(schema, toAnnotatorConfig(field.getMatching()));
            field.setIndexingScript(schema.getName(), (ScriptExpression)exactTransformer.convert(field.getIndexingScript()));
        }
    }
The implementation of exact matching

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