[BUG] Fix broken backward compatibility from 2.7 for IndexSorted field indices #10044
Labels
bug
Something isn't working
rolling-upgrade
Issues related to rolling upgrades
v2.10.0
v3.0.0
Issues and PRs related to version 3.0.0
Description
Upgrade to OpenSearch 2.7 is breaking with change #6424 . Not for all scenarios but when any index contains IndexSorted field of either BYTE, BOOLEAN, SHORT, INTEGER, where the IndexSortField we created in prior version was upcasted to LONG for all above types, which was removed in #6424 to achieve better performance for sort queries.
The SortField for IndexSort is stored in SegmentInfo and that gets retained when index is migrating from old cluster to new 2.7 cluster, and hence in IndexWriter creation, Lucene throws Excetion because on 2.7, IndexWriteConfiguration has IndexSort with non-upcasted type while in SegmentInfo Lucene finds the same sort field with up-casted.
i.e, check below scenario, where Index sort is on Integer field, and the index is migrating from older version to 2.7 version, and on newer version, the IndexWriterCreation fails with IndexSort mismatch between IndexWriteIndexSort & Lucene segmentinfo contained indexsort.
This fix we need to release as patch release for >=2.7 versions.
The text was updated successfully, but these errors were encountered: