You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by ot...@apache.org on 2008/09/15 17:33:16 UTC
svn commit: r695510 - in /lucene/java/trunk: CHANGES.txt
src/java/org/apache/lucene/index/IndexReader.java
Author: otis
Date: Mon Sep 15 08:33:15 2008
New Revision: 695510
URL: http://svn.apache.org/viewvc?rev=695510&view=rev
Log:
LUCENE-1131 - Added numDeletedDocs() to IndexReader
Modified:
lucene/java/trunk/CHANGES.txt
lucene/java/trunk/src/java/org/apache/lucene/index/IndexReader.java
Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=695510&r1=695509&r2=695510&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Mon Sep 15 08:33:15 2008
@@ -154,6 +154,8 @@
NO_NORMS becomes NOT_ANALYZED_NO_NORMS and a new ANALYZED_NO_NORMS
is added. (Mike McCandless)
+24. LUCENE-1131: Added numDeletedDocs method to IndexReader (Otis Gospodnetic)
+
Bug fixes
1. LUCENE-1134: Fixed BooleanQuery.rewrite to only optimize a single
Modified: lucene/java/trunk/src/java/org/apache/lucene/index/IndexReader.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/IndexReader.java?rev=695510&r1=695509&r2=695510&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/IndexReader.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/IndexReader.java Mon Sep 15 08:33:15 2008
@@ -622,6 +622,11 @@
*/
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>
<code>Document</code> in this index.
* @throws CorruptIndexException if the index is corrupt