jimczi opened a new pull request, #16565:
URL: https://github.com/apache/lucene/pull/16565

   `IndexWriter.updateBinaryDocValue` is missing the index-sort guard that 
`updateNumericDocValue` and the varargs `updateDocValues(Term, Field...)` 
already have: it does not reject updating a field that is part of the index 
sort. Updating a sort field's doc values would make the persisted sort order 
inconsistent with the values, so it should be rejected up front like the 
numeric path.
   
   The check goes **before** `verifyOrCreateDvOnlyField` here (unlike the 
numeric method, which checks after). An index sort field is never backed by 
binary doc values, so if the check came after the type validation it would 
never be reached — the user would instead get a less clear doc-values-type 
mismatch error. Placing it first surfaces the same clear "cannot update 
docvalues field involved in the index sort" message the numeric path gives.
   
   Extended `TestIndexSorting.testBadDVUpdate` to cover `updateBinaryDocValue` 
alongside the existing `updateNumericDocValue` and varargs assertions.
   
   Independent of the incremental doc-values work (#16418 / #16554).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to