You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Otis Gospodnetic (JIRA)" <ji...@apache.org> on 2007/04/10 00:05:33 UTC
[jira] Closed: (LUCENE-859) Expose the number of deleted docs in
index/segment
[ https://issues.apache.org/jira/browse/LUCENE-859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Otis Gospodnetic closed LUCENE-859.
-----------------------------------
Resolution: Won't Fix
Lucene Fields: [New, Patch Available] (was: [Patch Available, New])
Doooooh, of course! numDocs() looks like this:
public int numDocs() {
int n = maxDoc();
if (deletedDocs != null)
n -= deletedDocs.count();
return n;
}
Won't Fix.
> Expose the number of deleted docs in index/segment
> --------------------------------------------------
>
> Key: LUCENE-859
> URL: https://issues.apache.org/jira/browse/LUCENE-859
> Project: Lucene - Java
> Issue Type: New Feature
> Components: Index
> Reporter: Otis Gospodnetic
> Assigned To: Otis Gospodnetic
> Priority: Minor
> Attachments: LUCENE-859
>
>
> Use case:
> We've got a lot of large, mostly search-only indices. These indices are not re-optimized once "deployed". Docs in them do not get updated, but they do get deleted. After a while, the number of deleted docs grows, but it's hard to tell how many documents have been deleted.
> Exposing the number of deleted docs via *Reader.deletedDocs() method let's you get to this number.
> I'm attaching patch that touches the following:
> M src/test/org/apache/lucene/index/TestSegmentReader.java
> M src/java/org/apache/lucene/index/MultiReader.java
> M src/java/org/apache/lucene/index/IndexReader.java
> M src/java/org/apache/lucene/index/FilterIndexReader.java
> M src/java/org/apache/lucene/index/ParallelReader.java
> M src/java/org/apache/lucene/index/SegmentReader.java
> SegmentReader also got a public static main(String[]) that takes 1 command-line parameter, a path to the index to check, and prints out the number of deleted docs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org