The issue outlines the problem. When we have point value dimensions, segment core readers assume that there will be point files.
However, when allowing soft deletes and a document fails indexing failed before a point field could be written, this assumption fails. Consequently, the NRT fails to open.
I tried many different ways of fixing this issue.
Delaying on setting the field info until document writes are successful. But this causes weirdness with global field numbers and other assumptions and checks later in the document life-cycle
Reverting the field info if a all the docs for a field fail to index, but this causes other weirdness and edge cases that seemed too sharp to mess with.
So, I settled on always flushing a point file if the field info says there are point fields, even if there aren't any docs in the buffer.
Pinging some folks on review. This is a weird place in the codebase I haven't messed with before. This deserves careful review. Checks are green, but I may have missed some corners.
The issue outlines the problem. When we have point value dimensions, segment core readers assume that there will be point files.
However, when allowing soft deletes and a document fails indexing failed before a point field could be written, this assumption fails. Consequently, the NRT fails to open.
I tried many different ways of fixing this issue.
So, I settled on always flushing a point file if the field info says there are point fields, even if there aren't any docs in the buffer.
I am happy to consider other options.
closes https://github.com/apache/lucene/issues/13353