mirror of https://github.com/apache/lucene.git
LUCENE-7767: SortedDocValues.ordValue() now throws an IOException.
This commit is contained in:
parent
d9973a38db
commit
15a1561d43
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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)}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue