Return-Path: Delivered-To: apmail-jakarta-lucene-dev-archive@www.apache.org Received: (qmail 21060 invoked from network); 16 Jul 2004 13:02:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 16 Jul 2004 13:02:00 -0000 Received: (qmail 67810 invoked by uid 500); 16 Jul 2004 13:01:34 -0000 Delivered-To: apmail-jakarta-lucene-dev-archive@jakarta.apache.org Received: (qmail 67734 invoked by uid 500); 16 Jul 2004 13:01:33 -0000 Mailing-List: contact lucene-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Developers List" Reply-To: "Lucene Developers List" Delivered-To: mailing list lucene-dev@jakarta.apache.org Received: (qmail 67606 invoked by uid 99); 16 Jul 2004 13:01:32 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [213.53.169.170] (HELO mail.aduna.biz) (213.53.169.170) by apache.org (qpsmtpd/0.27.1) with ESMTP; Fri, 16 Jul 2004 06:01:29 -0700 Received: from smtp.aduna.biz (unknown [192.168.0.2]) by mail.aduna.biz (Postfix) with ESMTP id B14C95581E1 for ; Fri, 16 Jul 2004 12:56:45 +0000 (UTC) Received: from 192.168.0.1 ([192.168.0.1]) by smtp.aduna.biz (WinRoute Pro 4.2.5) with SMTP; Fri, 16 Jul 2004 15:01:21 +0200 Message-ID: <40F7D19F.5070805@aduna.biz> Date: Fri, 16 Jul 2004 15:01:19 +0200 From: Christiaan Fluit User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lucene Developers List Subject: Re: Deleting a document with an IndexWriter open References: <40F7C11B.7020803@detego-software.de> In-Reply-To: <40F7C11B.7020803@detego-software.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Christoph Goller wrote: > 1) Keep an IndexReader/Searcher open on your index in order to guarantee > reed access and a consistent index during the whole process. > > 2) Open a new IndexReader and delete all the documents that you want to > update. > > 3) Close the IndexReader (makes the deletions visible for any new > readers/writers but not for the still opened Searcher/Reader). But what happens when a query evaluated by the IndexReader/IndexSearcher mentioned in (1) results in a hit that has already been deleted by the second IndexReader? I.e. you try to access a document through one IndexReader that has already been deleted by another IndexReader. I would expect some kind of exception because the document data can no longer be found, or am I missing something? I hope I am because your solution does sound very attractive ;) Kind regards, Chris -- --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-dev-help@jakarta.apache.org