Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 45411 invoked from network); 17 Oct 2004 12:36:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 17 Oct 2004 12:36:42 -0000 Received: (qmail 91924 invoked by uid 500); 17 Oct 2004 12:36:06 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 91863 invoked by uid 500); 17 Oct 2004 12:36:05 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 91847 invoked by uid 99); 17 Oct 2004 12:36:05 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [217.16.100.196] (HELO mail3.nnithosting.com) (217.16.100.196) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 17 Oct 2004 05:36:05 -0700 Received: from localhost (localhost [127.0.0.1]) by localhost.nnithosting.com (Postfix) with ESMTP id DE7B741776 for ; Sun, 17 Oct 2004 14:35:59 +0200 (CEST) Received: from mail3.nnithosting.com ([127.0.0.1]) by localhost (mail2-9m-ext.nnithosting.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 03399-03 for ; Sun, 17 Oct 2004 14:35:59 +0200 (CEST) Received: from mail9m-int.nnithosting.com (unknown [10.1.13.98]) by mail2-9m-ext.nnithosting.com (Postfix) with ESMTP id 4EB5D41725 for ; Sun, 17 Oct 2004 14:35:59 +0200 (CEST) Received: from EXDKHUB070.corp.novocorp.net (exdkhub070.corp.novocorp.net [10.1.37.30]) by mail9m-int.nnithosting.com (Postfix) with ESMTP id 4437214800B for ; Sun, 17 Oct 2004 14:35:59 +0200 (CEST) Received: from EXDKHUB041.corp.novocorp.net ([10.1.8.121]) by EXDKHUB070.corp.novocorp.net with Microsoft SMTPSVC(5.0.2195.6713); Sun, 17 Oct 2004 14:35:59 +0200 Received: from EXDKBA030.corp.novocorp.net ([10.1.14.81]) by EXDKHUB041.corp.novocorp.net with Microsoft SMTPSVC(5.0.2195.6713); Sun, 17 Oct 2004 14:35:59 +0200 Received: from EXDKBA023.corp.novocorp.net ([10.1.25.2]) by EXDKBA030.corp.novocorp.net with Microsoft SMTPSVC(5.0.2195.6713); Sun, 17 Oct 2004 14:35:59 +0200 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C4B445.DAD46634" Subject: index, reindexing problem X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 Date: Sun, 17 Oct 2004 14:35:59 +0200 Message-ID: <264C522BA3BC7941BD1560AD9A17C4FA02470C4D@exdkba023.novo.dk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: index, reindexing problem Thread-Index: AcS0RduBEM0sPmUYTP6yE3s15qDViA== From: "MATL (Mats Lindberg)" To: X-OriginalArrivalTime: 17 Oct 2004 12:35:59.0237 (UTC) FILETIME=[DAF3CB50:01C4B445] X-Virus-Scanned: by amavisd-new/catpipe/nnit at nnithosting.com X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C4B445.DAD46634 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello. =20 I have a problem when reindexing some documents after an index has been created, i get an error, the error is the following. caught a class java.io.IOException with message: Lock obtain timed out: Lock@C:\DOCUME~1\..........lucene-0b877c2d5472a608d6ec3ee6174018de-write .lock =20 =20 This is how i do it. 1.st make the index (_indexDir is the location of the index) writer =3D new IndexWriter(_indexDir, new StandardAnalyzer(), true); ..... do the indexing here writer.optimize(); writer.close(); this works fine =20 2. this is where i get the error (reindex an existing document) writer =3D new IndexWriter(_indexDir, new StandardAnalyzer(), false); Directory directory; IndexReader reader; // if the file is in the index already, remove it directory =3D FSDirectory.getDirectory(_indexDir, false); reader =3D IndexReader.open(directory); try { Term term =3D new Term("deleteid", deleteID.toLowerCase());=20 if (reader.docFreq(term) >=3D 1) { deletedItems =3D reader.delete(term);// ----- this is where the error occurs, i get the locking error } } catch (Exception e) { System.out.println(" caught a " + e.getClass() + "\n with message: " + e.getMessage());} finally { reader.close(); directory.close(); } continue with reindexing the new document ...... =20 I hope anyone can help me with this problem. =20 Best regards, Mats Lindberg =20 ------_=_NextPart_001_01C4B445.DAD46634--