LUCENE-7767: SortedDocValues.ordValue() now throws an IOException.

This commit is contained in:
Adrien Grand 2017-04-11 10:02:51 +02:00
parent d9973a38db
commit 15a1561d43
4 changed files with 4 additions and 4 deletions

View File

@ -1031,7 +1031,7 @@ public class MultiDocValues {
}
@Override
public int ordValue() {
public int ordValue() throws IOException {
return (int) mapping.getGlobalOrds(nextLeaf-1).get(currentValues.ordValue());
}

View File

@ -46,7 +46,7 @@ public abstract class SortedDocValues extends BinaryDocValues {
* @return ordinal for the document: this is dense, starts at 0, then
* increments by 1 for the next value in sorted order.
*/
public abstract int ordValue();
public abstract int ordValue() throws IOException;
/** Retrieves the value for the specified ordinal. The returned
* {@link BytesRef} may be re-used across calls to {@link #lookupOrd(int)}

View File

@ -154,7 +154,7 @@ public class TestDiversifiedTopDocsCollector extends LuceneTestCase {
}
@Override
public long longValue() {
public long longValue() throws IOException {
// Keys are always expressed as a long so we obtain the
// ordinal for our String-based artist name here
return sdv.ordValue();

View File

@ -630,7 +630,7 @@ public class AssertingLeafReader extends FilterLeafReader {
}
@Override
public int ordValue() {
public int ordValue() throws IOException {
assertThread("Sorted doc values", creationThread);
assert exists;
int ord = in.ordValue();