Prohibit indexing a document with parent for a non child type.

Prohibit indexing a document with parent for a type that doesn't have a `_parent` field configured.

Relates to #3848