Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 72060 invoked from network); 9 Apr 2007 22:25:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Apr 2007 22:25:55 -0000 Received: (qmail 39125 invoked by uid 500); 9 Apr 2007 22:25:59 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 39079 invoked by uid 500); 9 Apr 2007 22:25:59 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 39068 invoked by uid 99); 9 Apr 2007 22:25:59 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2007 15:25:59 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2007 15:25:52 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 56DCC714077 for ; Mon, 9 Apr 2007 15:25:32 -0700 (PDT) Message-ID: <11348333.1176157532352.JavaMail.jira@brutus> Date: Mon, 9 Apr 2007 15:25:32 -0700 (PDT) From: "Yonik Seeley (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-859) Expose the number of deleted docs in index/segment In-Reply-To: <4672925.1176152012288.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org