Closed msokolov closed 4 months ago
hm maybe this is not safe? If one creates a doc block filled with empty documents? I'm not sure ... OTOH if they have no fields how can it ever matter what one does with them?!
I'll push since there don't seem to be any concerns raised. If we later want to make the index metadata a first-class file on its own we can always do that.
Would it be possible to back-port this fix to v.9.11? I did hit this issue as well while trying to make use of #12829.
I don't think we can backport to 9.11 since it has already been released, but I will backport to 9.x and then it should get released with the next. There was some talk about a 9.11.1, so maybe it would be in that?
That would be nice, thanks. @jpountz @benwtrent fyi.
@msokolov it might be worth doing a 9.11.1 release to fix this particular bug and maybe another other one: https://github.com/apache/lucene/pull/13475
I didn't know about this outstanding bug (parent field with empty index) when I originally did the 9.11 release, I should have investigated.
sigh, I would have backported right away except for some reason I thought the parent-field enforcement was only on 10.x not 9.x
Addresses #13340 . It relaxes the previous rule that adding a parent field to an existing index is always forbidden, allowing it in the case where no fields have been created. In such a case it will be safe, and this enables the trivial case of opening and closing a new empty index twice to work in a sensible way.