-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexWriter loses track of parent field when index is empty #13340
Comments
I hope someone who is familiar with this will quickly see the problem - I'm not sure if we (1) maybe fail to write any FieldInfos when the index is empty, but now we must, or (2) fail to notice that the index we just opened has no FieldInfos and therefore can have a parent field added? It makes more sense to me that we should write a FieldInfos for an empty index. |
I tried removing
from |
OK, now I see that field infos is part of the segment so we would not have written it. I guess in this case we should explicitly recognize and work around the empty case. |
@simonw of you get a moment, your perspective would be helpful. Should we be writing index metadata somewhere outside of a segment? Or tweak the hack we have... |
Description
This test fails with
java.lang.IllegalArgumentException: can't add a parent field to an already existing index without a parent field
. If you index any documents in the index, using the parent field or no, then the test passes.Version and environment details
No response
The text was updated successfully, but these errors were encountered: