Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): OpenSearch 3.3.1
Describe the issue: During our testing, we identified that when index-level sorting is configured, openSearch 3.3.1 handles the internal__nested_parent field during snapshot restore incorrectly. As a result, after backup restored, some indices health is remaining in red state.
Affected
OpenSearch version: 3.3.1 (Lucene 10.3.1)
Condition: Index created with sort.field and sort.order settings
Operation: Snapshot restore
Not Affected
Indices without sort settings
Indices created on older versions (2.x) and upgraded to 3.3.1
References:
IndexWriter requires a parent document field in order to use index sorting with document blocks (Add support for index sorting with document blocks by s1monw · Pull Request #12829 · apache/lucene · GitHub)
For indices newly created as of 10.0.0 onwards, IndexWriter preserves document blocks indexed via IndexWriter#addDocuments or IndexWriter#updateDocuments when index sorting is configured. Document blocks are maintained alongside their parent documents during sort and merge. The internally used parent field must be configured in IndexWriterConfig only if index sorting is used together with documents blocks. See IndexWriterConfig#setParendField for reference.
Would you kindly describe this behavior and offer any recommendations for future actions to resolve the problem?
Configuration:
“settings”: {
“number_of_shards”: 1,
“number_of_replicas”: 1,
“sort.field”: “insertTime.keyword”,
“sort.order”: “desc”
},
“mappings”: {
“properties”: {
“insertTime”: {
“type”: “date”,
“fields”: {
“keyword”: {“type”: “keyword”}
}
}
}
}
}’
Relevant Logs or Screenshots:
IllegalArgumentException[can’t add field [__nested_parent] as parent document field; this IndexWriter has no parent document field configured]
![]()