Apache Lucene open-source search software
Document that bulkScorer method can return null (#11897)
Nhat Nguyen1a5ad61b9d63
diff --git a/lucene/core/src/java/org/apache/lucene/search/Weight.java b/lucene/core/src/java/org/apache/lucene/search/Weight.javaindex 1a81581bf80..c816551f6af 100644--- a/lucene/core/src/java/org/apache/lucene/search/Weight.java+++ b/lucene/core/src/java/org/apache/lucene/search/Weight.java@@ -158,7 +158,9 @@ public abstract class Weight implements SegmentCacheable {** @param context the {@link org.apache.lucene.index.LeafReaderContext} for which to return the* {@link Scorer}.- * @return a {@link BulkScorer} which scores documents and passes them to a collector.+ * @return a {@link BulkScorer} which scores documents and passes them to a collector. Like {@link+ * #scorer(LeafReaderContext)}, this method can return null if this query matches no+ * documents.* @throws IOException if there is a low-level I/O error*/public BulkScorer bulkScorer(LeafReaderContext context) throws IOException {