apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.45k stars 973 forks source link

Fix weird NRT bug #13353 #13369

Closed benwtrent closed 1 month ago

benwtrent commented 1 month ago

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

benwtrent commented 1 month ago

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.