We have a check that enforces the total number of fields needs to be below a certain (configurable) threshold in each index. 

Runtime fields currently do not contribute to the count. There have been misunderstandings around this, caused by runtime fields not having a corresponding lucene field. Object fields and alias fields don't have corresponding lucene fields either yet they count towards the total fields limit.

The original goal of the total fields limit is to prevent a mappings explosion caused by a bogus document being indexed, as it would cause fields being dynamically added to the index mappings, which hinders stability due to the cluster state size of mappings as well as memory footprint of mappings in data nodes.

Runtime fields contribute to cluster state size and memory footprint of mappings like any other field, and they can be created dynamically when [`dynamic` is set to `runtime`](https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic.html#dynamic-parameters). Currently a bogus document can cause a mappings explosion when `dynamic` is set to `runtime` which is a bug. For this reason runtime fields should be counted towards the total fields count.
server/src/main/java/org/elasticsearch/index/mapper/MappingLookup.java
*/
    public MappedFieldType getFieldType(String field) {
        return fieldTypesLookup().get(field);
    }
    /**
     * Given a concrete field name, return its paths in the _source.
     *
     * For most fields, the source path is the same as the field itself. However
     * there are cases where a field's values are found elsewhere in the _source:
     *   - For a multi-field, the source path is the parent field.
     *   - One field's content could have been copied to another through copy_to.
     *
     * @param field The field for which to look up the _source path. Note that the field
     *              should be a concrete field and *not* an alias.
     * @return A set of paths in the _source that contain the field's values.
     */
    public Set<String> sourcePaths(String field) {
        return fieldTypesLookup().sourcePaths(field);
    }
    /**
     * Returns true if the index has mappings. An index does not have mappings only if it was created
     * without providing mappings explicitly, and no documents have yet been indexed in it.
     * @return true if the current index has mappings, false otherwise
     */
    public boolean hasMappings() {
        return this != EMPTY;
    }
    public boolean isSourceEnabled() {
        SourceFieldMapper sfm = mapping.getMetadataMapperByClass(SourceFieldMapper.class);
        return sfm != null && sfm.enabled();