Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 21760 invoked from network); 8 Feb 2008 19:45:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Feb 2008 19:45:30 -0000 Received: (qmail 66660 invoked by uid 500); 8 Feb 2008 19:45:15 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 66631 invoked by uid 500); 8 Feb 2008 19:45:15 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 66620 invoked by uid 99); 8 Feb 2008 19:45:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Feb 2008 11:45:15 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of spring@gmx.eu designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 08 Feb 2008 19:44:45 +0000 Received: (qmail invoked by alias); 08 Feb 2008 19:44:50 -0000 Received: from e179037079.adsl.alicedsl.de (EHLO msrvcn04) [85.179.37.79] by mail.gmx.net (mp005) with SMTP; 08 Feb 2008 20:44:50 +0100 X-Authenticated: #2635966 X-Provags-ID: V01U2FsdGVkX1+oswcTOSioqwNhGvbMHX+P2LeseokQaUCw3hqdED IzTJ0Xx9EAaww5 From: To: References: <3241C6045C914BC486B1283E6C9D5577@msrvcn04> Subject: RE: IndexWriter: setRAMBufferSizeMB Date: Fri, 8 Feb 2008 20:44:51 +0100 Message-ID: <90CCAC5AF2684E1DA3F6710317E2F421@msrvcn04> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133 In-Reply-To: Thread-Index: AchqgS5K8pxrPCyhQDer03+Sk8ezGwACDAkA X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org OK, so there is nothing in 2.3 besides IndexWriter.close to ensure that the docs are written to disk and that the index will survive an application / machine death? > -----Original Message----- > From: Michael McCandless [mailto:lucene@mikemccandless.com] > Sent: Freitag, 8. Februar 2008 19:34 > To: java-user@lucene.apache.org > Subject: Re: IndexWriter: setRAMBufferSizeMB > > Well ... every time the RAM buffer is full, a new segment is flushed > to the Directory, but that is not necessarily a "commit" in that > an IndexReader would see the new segment, nor, that the segment would > survive if the machine suddenly crashed. > > You should't rely on when specifically IndexWriter makes its changes > visible to readers. The best way to be sure is to close the writer. > > There is work underway now, in this issue: > > https://issues.apache.org/jira/browse/LUCENE-1044 > > that will add an explicit "commit" call, which you would use to 1) > make the changes visible to readers, and 2) sync the index such that > if the machine crashed (after commit returns) then your changes as of > the commit will survive. But it's not committed yet ... it will be in > 2.4. > > One way for a reader to check if a new commit has happened is to > call the isCurrent method. Maybe that helps? > > Mike > > wrote: > > > Hi, > > > > if I understand this property correctly every time the ram buffer > > is full it > > gets automaticaly written to disk. Something like a commit in a > > database. > > Thus if my application dies, all docs in the buffer get lost. Right? > > > > If so, is there any event/callback etc. which informs my > > application that > > such a commit happend? > > > > Thank you. > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > > For additional commands, e-mail: java-user-help@lucene.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org