-
Notifications
You must be signed in to change notification settings - Fork 1.2k
assertDocValuesEquals should support sparse sorted doc_values #14839
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
assertDocValuesEquals should support sparse sorted doc_values #14839
Conversation
In LuceneTestCase, assertDocValuesEquals compares the doc_values in two indices. For SortedSetDocValues, as well as other doc value types, it does not assume that every document has a value. But for SortedDocValues, it requires that every doc have a value. Remove this restriction.
This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR. |
document.removeFields("sparseset"); | ||
if (random.nextBoolean()) { | ||
document.add(new SortedDocValuesField("sparseset", new BytesRef(title))); | ||
} |
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.
This function is also used in TestDuelingCodecsAtNight
. This comment:
lucene/lucene/core/src/test/org/apache/lucene/index/TestDuelingCodecsAtNight.java
Line 24 in a94fbb7
@SuppressCodecs({"Direct"}) // it can be too much for these codecs |
Can you add a CHANGES entry under 10.3 before I merge? |
@jpountz Whoops, I missed that it needed a change log entry. Thanks for the heads up. Add an entry to the 10.3 section. Thanks! |
* assertDocValuesEquals should support sparse sorted doc_values In LuceneTestCase, assertDocValuesEquals compares the doc_values in two indices. For SortedSetDocValues, as well as other doc value types, it does not assume that every document has a value. But for SortedDocValues, it requires that every doc have a value. Remove this restriction. * add change to CHANGES.txt
In LuceneTestCase, assertDocValuesEquals compares the doc_values in two indices. For SortedSetDocValues, as well as other doc value types, it does not assume that every document has a value. But for SortedDocValues, it requires that every doc have a value. This restricts what indices
assertDocValuesEquals
can be used to test. So this PR removes this restriction and does not assume that every doc has a value.