Skip to content

Apache Lucene open-source search software

Remove unused DocIdSet#all method (#14288)

Luca Cavannafaaf22b782a6
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index ded28485056..7688f57d465 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -16,6 +16,8 @@ API Changes
* GITHUB#14284: Remove IOException from DocIdSet#iterator signature (Luca Cavanna)
+* GITHUB#14288: The unused public static DocIdSet#all method has been removed. (Luca Cavanna)
+
New Features
---------------------
* GITHUB#14097: Binary partitioning merge policy over float-valued vector field. (Mike Sokolov)
@@ -60,6 +62,9 @@ API Changes
* GITHUB#14282: Remove redundant field argument from the DocIdSetBuilder constructor that takes a
PointValues instance. (Luca Cavanna)
+* GITHUB#14289: The unused public static DocIdSet#all method has been deprecated.
+ (Luca Cavanna)
+
New Features
---------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/DocIdSet.java b/lucene/core/src/java/org/apache/lucene/search/DocIdSet.java
index 7e75aa8f5e8..03bc92decea 100644
--- a/lucene/core/src/java/org/apache/lucene/search/DocIdSet.java
+++ b/lucene/core/src/java/org/apache/lucene/search/DocIdSet.java
@@ -48,26 +48,6 @@ public abstract class DocIdSet implements Accountable {
}
};
- /** A {@code DocIdSet} that matches all doc ids up to a specified doc (exclusive). */
- public static DocIdSet all(int maxDoc) {
- return new DocIdSet() {
- @Override
- public DocIdSetIterator iterator() {
- return DocIdSetIterator.all(maxDoc);
- }
-
- @Override
- public Bits bits() throws IOException {
- return new Bits.MatchAllBits(maxDoc);
- }
-
- @Override
- public long ramBytesUsed() {
- return Integer.BYTES;
- }
- };
- }
-
/**
* Provides a {@link DocIdSetIterator} to access the set. This implementation can return <code>
* null</code> if there are no docs that match.