-
Notifications
You must be signed in to change notification settings - Fork 962
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
Fix BWC test generation after mondernizing LineDocFile #13021
Conversation
The changes on apache#12929 broke the generation code for BWC indices since they are expecting vertain fields created by LineDocFile. Yet, this change adds some sanity checks that run with unittest to ensure the bwc generatin is at least readable with the current version. Relates to apache#12929
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
...ne/backward-codecs/src/test/org/apache/lucene/backward_index/TestBackwardsCompatibility.java
Outdated
Show resolved
Hide resolved
if (docIdDV == null) { | ||
docIdDV = new NumericDocValuesField("docid_intDV", 0); | ||
doc.add(docIdDV); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: this seems to assume that the Document
instance that is returned is always the same, which feels a bit fragile. Maybe do a shallow copy of the document all the time? Or use TestUtil.cloneDocument()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, so we are doing this in the other tests too bef0r my change. That's why i did it that way... I can clean this all up in a followup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good!
The changes on #12929 broke the generation code for BWC indices since they are expecting certain fields created by LineDocFile. Yet, this change adds some sanity checks that run with unittest to ensure the bwc generatin is at least readable with the current version.
Relates to #12929