[ https://issues.apache.org/jira/browse/LUCENE-859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487644 ]
Yonik Seeley commented on LUCENE-859: ------------------------------------- > Though it might still be handy to have something with main() that spits out > the number of deleted > documents, as SegmentReader has in my patch. I don't understand that comment. I don't see anything in your patch besides the implementation of deletedDocs(). > Maybe that should be added to the existing IndexReader.main ? That sounds fine. > 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]