Open
Description
Is your feature request related to a problem? Please describe
Currently index sorting and nested fields are mutually exclusive features (validated by DocumentMapper). However it should be possible to allow them to be used together under certain constraints.
Describe the solution you'd like
Indexing sorting should be possible if the fields used for sorting are not on the nested document and are instead only on the parent document. This would allow for nested documents to have subsequent doc IDs immediately after the parent document
Related component
Indexing
Describe alternatives you've considered
No response
Additional context
Its not clear to me if simply tweaking the validation logic would be sufficient or if there are additional changes required when applying the index sort.