private void noViewShadowing(String name) {
        if (indexNames.contains(name)) {
            throw new IllegalArgumentException("Schema '" + getName() + "' already contains an index with name '" +
                                               name + "'. Shadowing is not supported.");
        }
    }
Adds a document that can be mapped to this schema.

@param source a document that can be mapped to this schema.
@return Itself for chaining.
config-model/src/main/java/com/yahoo/vespa/documentmodel/SchemaDef.java