mirror of https://github.com/apache/lucene.git
LUCENE-9366: Remove unused maxDoc parameter from DocValues.emptySortedNumeric() (#1491)
This commit is contained in:
parent
583499243a
commit
d06294e6ab
|
@ -150,6 +150,9 @@ API Changes
|
|||
provide them lazily. TermsInSetQuery switches to using this method
|
||||
to report matching terms. (Alan Woodward)
|
||||
|
||||
* LUCENE-9366: DocValues.emptySortedNumeric() not longer takes a maxDoc parameter
|
||||
(Alan Woodward)
|
||||
|
||||
* LUCENE-7822: CodecUtil#checkFooter(IndexInput, Throwable) now throws a
|
||||
CorruptIndexException if checksums mismatch or if checksums can't be verified.
|
||||
(Martin Amirault, Adrien Grand)
|
||||
|
|
|
@ -393,7 +393,7 @@ public abstract class DocValuesConsumer implements Closeable {
|
|||
}
|
||||
}
|
||||
if (values == null) {
|
||||
values = DocValues.emptySortedNumeric(mergeState.maxDocs[i]);
|
||||
values = DocValues.emptySortedNumeric();
|
||||
}
|
||||
cost += values.cost();
|
||||
subs.add(new SortedNumericDocValuesSub(mergeState.docMaps[i], values));
|
||||
|
|
|
@ -168,7 +168,7 @@ public final class DocValues {
|
|||
/**
|
||||
* An empty SortedNumericDocValues which returns zero values for every document
|
||||
*/
|
||||
public static final SortedNumericDocValues emptySortedNumeric(int maxDoc) {
|
||||
public static final SortedNumericDocValues emptySortedNumeric() {
|
||||
return new SortedNumericDocValues() {
|
||||
|
||||
private int doc = -1;
|
||||
|
@ -387,7 +387,7 @@ public final class DocValues {
|
|||
NumericDocValues single = reader.getNumericDocValues(field);
|
||||
if (single == null) {
|
||||
checkField(reader, field, DocValuesType.SORTED_NUMERIC, DocValuesType.NUMERIC);
|
||||
return emptySortedNumeric(reader.maxDoc());
|
||||
return emptySortedNumeric();
|
||||
}
|
||||
return singleton(single);
|
||||
}
|
||||
|
|
|
@ -434,7 +434,7 @@ public class MultiDocValues {
|
|||
LeafReaderContext context = leaves.get(i);
|
||||
SortedNumericDocValues v = context.reader().getSortedNumericDocValues(field);
|
||||
if (v == null) {
|
||||
v = DocValues.emptySortedNumeric(context.reader().maxDoc());
|
||||
v = DocValues.emptySortedNumeric();
|
||||
} else {
|
||||
anyReal = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue