Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 19995 invoked from network); 22 Feb 2006 01:25:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Feb 2006 01:25:30 -0000 Received: (qmail 5283 invoked by uid 500); 22 Feb 2006 01:25:24 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 5258 invoked by uid 500); 22 Feb 2006 01:25:23 -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 5247 invoked by uid 99); 22 Feb 2006 01:25:23 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2006 17:25:23 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [169.229.70.167] (HELO rescomp.berkeley.edu) (169.229.70.167) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2006 17:25:22 -0800 Received: by rescomp.berkeley.edu (Postfix, from userid 1007) id 41C5D5B773; Tue, 21 Feb 2006 17:24:58 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by rescomp.berkeley.edu (Postfix) with ESMTP id 3ADE27F403 for ; Tue, 21 Feb 2006 17:24:58 -0800 (PST) Date: Tue, 21 Feb 2006 17:24:58 -0800 (PST) From: Chris Hostetter To: java-user@lucene.apache.org Subject: Re: Open an IndexWriter in parallel with an IndexReader on the same index. In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N : It would have been nice if someone wrote something like indexModifier, : but with a cache, similar to what Yonik suggested above: deletions will : not be done immediately, but rather cached and later done in batches. : Of course, batched deletions should not remember the term to delete, : but rather the matching document numbers at the time of the deletion - : because after the addition of the modified document if we search for : the term again we'll find two documents. That's not a safe sequence of events. An Add can trigger a segment merge, which cna renumber documents. As yonik said, you want to queue up the adds/updates, then do a delete for each update in your queue, then do your adds in one batch. knowing when/what to delete requies knowing a "key" for your records -- which isnt' a native lucne concept, but it is certainly a general enough one that a helper class could be written for this. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org