private void implementTagType(SDField field) {
        field.setDataType(DataType.getWeightedSet(DataType.STRING, true, true));
        // Don't set matching and ranking if this field is not attribute nor index
        if (!field.doesIndexing() && !field.doesAttributing()) return;
        Matching m = field.getMatching();
        if ( ! m.isTypeUserSet())
            m.setType(MatchType.WORD);
        if (field.getRankType() == null || field.getRankType() == RankType.DEFAULT)
            field.setRankType((RankType.TAGS));
    }
The implementation of the tag datatype

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