mirror of https://github.com/apache/lucene.git
LUCENE-1131 - Added numDeletedDocs() to IndexReader
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@695510 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d2aeaeeff2
commit
8d02d7859f
|
@ -154,6 +154,8 @@ API Changes
|
||||||
NO_NORMS becomes NOT_ANALYZED_NO_NORMS and a new ANALYZED_NO_NORMS
|
NO_NORMS becomes NOT_ANALYZED_NO_NORMS and a new ANALYZED_NO_NORMS
|
||||||
is added. (Mike McCandless)
|
is added. (Mike McCandless)
|
||||||
|
|
||||||
|
24. LUCENE-1131: Added numDeletedDocs method to IndexReader (Otis Gospodnetic)
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
|
|
||||||
1. LUCENE-1134: Fixed BooleanQuery.rewrite to only optimize a single
|
1. LUCENE-1134: Fixed BooleanQuery.rewrite to only optimize a single
|
||||||
|
|
|
@ -622,6 +622,11 @@ public abstract class IndexReader {
|
||||||
*/
|
*/
|
||||||
public abstract int maxDoc();
|
public abstract int maxDoc();
|
||||||
|
|
||||||
|
/** Returns the number of deleted documents. */
|
||||||
|
public int numDeletedDocs() {
|
||||||
|
return maxDoc() - numDocs();
|
||||||
|
}
|
||||||
|
|
||||||
/** Returns the stored fields of the <code>n</code><sup>th</sup>
|
/** Returns the stored fields of the <code>n</code><sup>th</sup>
|
||||||
<code>Document</code> in this index.
|
<code>Document</code> in this index.
|
||||||
* @throws CorruptIndexException if the index is corrupt
|
* @throws CorruptIndexException if the index is corrupt
|
||||||
|
|
Loading…
Reference in New Issue