private void validate() {
        if (attribute || !indexed) {
            return;
        }
        DataType fieldType = getDataType();
        DataType primiType = fieldType.getPrimitiveType();
        if (DataType.STRING.equals(primiType) || DataType.URI.equals(primiType)) {
            return;
        }
        throw new IllegalArgumentException("Expected type " + DataType.STRING.getName() + " for indexed field '" +
                                           getName() + "', got " + fieldType.getName() + ".");
    }
This is a representation of features to generate for this field.
It can be both optimize hints, and real functional hints.
config-model/src/main/java/com/yahoo/vespa/documentmodel/SearchField.java