From java-user-return-13897-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Mon Apr 04 08:25:56 2005 Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 57704 invoked from network); 4 Apr 2005 08:25:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Apr 2005 08:25:56 -0000 Received: (qmail 52146 invoked by uid 500); 4 Apr 2005 08:25:50 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 52122 invoked by uid 500); 4 Apr 2005 08:25:50 -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 52103 invoked by uid 99); 4 Apr 2005 08:25:50 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from intranet.runtime-collective.com (HELO mail.runtime-collective.com) (212.42.171.82) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 04 Apr 2005 01:25:48 -0700 Received: from [81.168.89.246] (helo=[192.168.1.28]) by mail.runtime-collective.com with smtp (Exim 3.35 #1 (Debian)) id 1DIMu0-0006rm-00 for ; Mon, 04 Apr 2005 09:25:44 +0100 Subject: Re: Lucene on Linux problem... From: Miles Barr To: Lucene User In-Reply-To: <20050402082934.6853927E19A@ns2.pil.dk> References: <20050402082934.6853927E19A@ns2.pil.dk> Content-Type: text/plain Organization: Runtime Collective Ltd. Date: Mon, 04 Apr 2005 09:24:50 +0100 Message-Id: <1112603090.15511.45.camel@saturn> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Sat, 2005-04-02 at 10:29 +0200, Kristian Ottosen wrote: > I wonder if there is general problem running Lucene on top of some of the > journaling file systems like ReiserFS or Ext3? I haven't had any problems running Lucene on either of those file systems. I've done updates to the index while people are still searching and it all worked fine. > The problem may not appear immediately - but only after several > thousand documents have been indexed in a row using a combination of > IndexSearcher (check for duplicates) and IndexWriter (add document) > operations. Are you deleting the duplicates as you find them? i.e. are you closing and opening reader/writers all the time? If you are, besides recommending switching to batch updates, I suggest being really thorough with closing everything, e.g. IndexReader reader = null; IndexWriter writer = null; try { reader = IndexReader.open(/* Path to index */); ... do the deletes ... reader.close(); reader = null; writer = new IndexWriter(index, /* Your analyzer */, false); ... do the deletes .... writer.optimize(); writer.close(); writer = null; } catch (IOException e) { ... do any error processing ... } finally { // We can do both these closes in the same finally block because if // reader is not null then writer is null, so we don't need to worry // about reader.close() throwing another IOException if (reader != null) { reader.close(); reader = null; } if (writer != null) { writer.optimize(); writer.close(); writer = null; } } -- Miles Barr Runtime Collective Ltd. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org