There is already a limit on the number of nested fields per index (#14983). However that doesn't stop anyone from adding many nested json objects to a nested field inside a single document.
I believe we should add at least a soft limit to the number of nested Lucene documents that we index per json document. This to avoid a node going OOM when a single document contains too many nested json objects a node can handle indexing. While indexing we check the number of nested docs and if they go beyond a threshold (maybe 10000?) then we should abort and fail with an error.
Relates to #11511
There is already a limit on the number of nested fields per index (#14983). However that doesn't stop anyone from adding many nested json objects to a nested field inside a single document.
I believe we should add at least a soft limit to the number of nested Lucene documents that we index per json document. This to avoid a node going OOM when a single document contains too many nested json objects a node can handle indexing. While indexing we check the number of nested docs and if they go beyond a threshold (maybe 10000?) then we should abort and fail with an error.
Relates to #11511