Skip to content

Commit 3833804

Browse files
committed
Improve docs.
1 parent fd97a02 commit 3833804

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

lucene/core/src/java/org/apache/lucene/index/PostingsEnum.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ protected PostingsEnum() {}
101101

102102
/**
103103
* Fill a buffer of doc IDs and frequencies with some number of doc IDs and their corresponding
104-
* frequencies, starting at the current doc ID, and ending before {@code upTo}.
104+
* frequencies, starting at the current doc ID, and ending before {@code upTo}. Because it starts
105+
* on the current doc ID, it is illegal to call this method if the {@link #docID() current doc ID}
106+
* is {@code -1}.
105107
*
106108
* <p>An empty buffer after this method returns indicates that there are no postings left between
107109
* the current doc ID and {@code upTo}.

lucene/core/src/java/org/apache/lucene/search/Scorer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ public int advanceShallow(int target) throws IOException {
8080

8181
/**
8282
* Return a new batch of doc IDs and scores, starting at the current doc ID, and ending before
83-
* {@code upTo}.
83+
* {@code upTo}. Because it starts on the current doc ID, it is illegal to call this method if the
84+
* {@link #docID() current doc ID} is {@code -1}.
8485
*
8586
* <p>An empty return value indicates that there are no postings left between the current doc ID
8687
* and {@code upTo}.

lucene/core/src/test/org/apache/lucene/search/TestSimpleSearchEquivalence.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public void testTermVersusBooleanOr() throws Exception {
3737
BooleanQuery.Builder q2 = new BooleanQuery.Builder();
3838
q2.add(new TermQuery(t1), Occur.SHOULD);
3939
q2.add(new TermQuery(t2), Occur.SHOULD);
40-
4140
assertSubsetOf(q1, q2.build());
4241
}
4342

0 commit comments

Comments
 (0)