Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 41664 invoked from network); 14 Jul 2006 14:23:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Jul 2006 14:23:16 -0000 Received: (qmail 44715 invoked by uid 500); 14 Jul 2006 14:23:16 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 44087 invoked by uid 500); 14 Jul 2006 14:23:13 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 44076 invoked by uid 99); 14 Jul 2006 14:23:13 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jul 2006 07:23:13 -0700 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of yseeley@gmail.com designates 64.233.166.177 as permitted sender) Received: from [64.233.166.177] (HELO py-out-1112.google.com) (64.233.166.177) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jul 2006 07:23:12 -0700 Received: by py-out-1112.google.com with SMTP id b29so651576pya for ; Fri, 14 Jul 2006 07:22:52 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qYM2UcS3CkBfM0EqAKkMv3WGYDf9LZ/PK6fGQhx/yDxcCd8tjDmvvlJnxG7hL+OyIoBh4QhBLaT1bHtk++P44/wn6EZr9/0BsJukPHMcU2Ic6MkZETtSMm8tmlvvb9GejxpJeIfdkWP75LafcJH0AgeS3tCDxMD81ORPnmwQlE8= Received: by 10.35.34.18 with SMTP id m18mr2032753pyj; Fri, 14 Jul 2006 07:22:51 -0700 (PDT) Received: by 10.35.129.12 with HTTP; Fri, 14 Jul 2006 07:22:51 -0700 (PDT) Message-ID: Date: Fri, 14 Jul 2006 10:22:51 -0400 From: "Yonik Seeley" To: java-dev@lucene.apache.org Subject: Re: [jira] Commented: (LUCENE-565) Supporting deleteDocuments in IndexWriter (Code and Performance Results Provided) In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <14645793.1152156330186.JavaMail.jira@brutus> <20060707130551.GA10773@fermat.math.technion.ac.il> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 7/14/06, Ning Li wrote: > I have viewed "delete by term" (which is supported by IndexReader and > NewIndexModifier) as a kind of "delete by query", not "delete by id". > > If I replace Term in DeleteTerm with Query (or query string), and > re-define applyDeletesSelectively() as follows (this is not the best > possible implementation, but you get the idea): > > I hope the point is clear now. :-) The patch was designed so that it > can support "delete by term" and even "delete by query" in general, Hey, you're moving the goalposts ;-) You proposed a specific patch, and it certtainly doesn't have support for delete-by-query. But yes, using the approach of your first patch, you could come up with another that could more efficiently support delete-by-query... there would probably need to be a little more work to do it efficiently though (w/o creating scorers for each individual reader perhaps). If one is going to be able to support deleteByQuery, why not a full IndexSearcher/IndexWriter combination? As far as implementation, right now NewIndexModifier overrides and reimplements much of the guts of IndexWriter. Is there a way of lowering that profile by providing some extension points, or places to hook into IndexWriter events (like before the ram segment is going to be flushed)? Maybe IndexWriter could call a specific method on a callback interface with List that returns a list of document ids to delete (through an efficient interface such as HitCollector or Matcher of course). Something like that would be much more general if it's doable. -Yonik http://incubator.apache.org/solr Solr, the open-source Lucene search server --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org