Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 37195 invoked from network); 19 Jun 2009 20:18:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Jun 2009 20:18:19 -0000 Received: (qmail 61638 invoked by uid 500); 19 Jun 2009 20:18:29 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 61542 invoked by uid 500); 19 Jun 2009 20:18:29 -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 61534 invoked by uid 99); 19 Jun 2009 20:18:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jun 2009 20:18:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jun 2009 20:18:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 770F229A0014 for ; Fri, 19 Jun 2009 13:18:07 -0700 (PDT) Message-ID: <80346501.1245442687486.JavaMail.jira@brutus> Date: Fri, 19 Jun 2009 13:18:07 -0700 (PDT) From: "Tim Smith (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Created: (LUCENE-1705) Add deleteAllDocuments() method to IndexWriter MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org Add deleteAllDocuments() method to IndexWriter ---------------------------------------------- Key: LUCENE-1705 URL: https://issues.apache.org/jira/browse/LUCENE-1705 Project: Lucene - Java Issue Type: Wish Components: Index Affects Versions: 2.4 Reporter: Tim Smith Ideally, there would be a deleteAllDocuments() or clear() method on the IndexWriter This method should have the same performance and characteristics as: * currentWriter.close() * currentWriter = new IndexWriter(..., create=true,...) This would greatly optimize a delete all documents case. Using deleteDocuments(new MatchAllDocsQuery()) could be expensive given a large existing index. IndexWriter.deleteAllDocuments() should have the same semantics as a commit(), as far as index visibility goes (new IndexReader opening would get the empty index) I see this was previously asked for in LUCENE-932, however it would be nice to finally see this added such that the IndexWriter would not need to be closed to perform the "clear" as this seems to be the general recommendation for working with an IndexWriter now deleteAllDocuments() method should: * abort any background merges (they are pointless once a deleteAll has been received) * write new segments file referencing no segments This method would remove one of the final reasons i would ever need to close an IndexWriter and reopen a new one -- 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