Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 27639 invoked from network); 4 Jan 2005 14:45:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 4 Jan 2005 14:45:12 -0000 Received: (qmail 72848 invoked by uid 500); 4 Jan 2005 14:43:07 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 72809 invoked by uid 500); 4 Jan 2005 14:43:06 -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 72780 invoked by uid 99); 4 Jan 2005 14:43:06 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from 87.52.220-216.q9.net (HELO mail.futurebrandexp.com) (216.220.52.87) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 04 Jan 2005 06:42:57 -0800 Received: from p001002 ([204.225.84.27]) by mail.futurebrandexp.com with Microsoft SMTPSVC(5.0.2195.5329); Tue, 4 Jan 2005 09:44:56 -0500 Message-ID: <03b801c4f26b$f59e6f00$7703d00a@hypermedia.com> From: "Luke Shannon" To: "Lucene Users List" References: Subject: Re: Deleting an index Date: Tue, 4 Jan 2005 09:44:56 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-OriginalArrivalTime: 04 Jan 2005 14:44:56.0991 (UTC) FILETIME=[F5A59AF0:01C4F26B] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N If you opened an IndexReader was has it also been closed before you attempt to delete? ----- Original Message ----- From: "Scott Smith" To: Sent: Monday, January 03, 2005 7:39 PM Subject: Deleting an index I'm writing some junit tests for my search code (which layers on top of Lucene). The tests all follow the same pattern: 1. setUp(): Create some directories; write some files to be indexed 2. someTest: Call the indexer to create an index on the generated files; do several searches and verify counts, expected hits, etc.; 3. tearDown(): Delete all of the directories and associated files included the just-created index. My problem is that I am unable to delete the index. I've narrowed it down to something in the search routine not letting go of the index file (i.e., if I do the indexing and comment out the search, then everything deletes fine). The search code is pretty straight forward. It creates a new IndexSearcher (which it caches and hence uses for all searches in the test). Each individual search simply creates several QueryParsers and then combines them to do a search using the cached IndexSearcher. After the last search, I close() the IndexSearcher. But something still seems to have hold of the index. I've tried nulling the hits object, but that didn't seem to affect anything. Any ideas? Scott --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org