From java-user-return-35445-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Tue Aug 12 09:37:12 2008 Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 80582 invoked from network); 12 Aug 2008 09:37:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Aug 2008 09:37:10 -0000 Received: (qmail 76167 invoked by uid 500); 12 Aug 2008 09:36:59 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 76136 invoked by uid 500); 12 Aug 2008 09:36:59 -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 76125 invoked by uid 99); 12 Aug 2008 09:36:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Aug 2008 02:36:59 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of cambazz@gmail.com designates 209.85.198.230 as permitted sender) Received: from [209.85.198.230] (HELO rv-out-0506.google.com) (209.85.198.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Aug 2008 09:36:03 +0000 Received: by rv-out-0506.google.com with SMTP id f6so3876775rvb.5 for ; Tue, 12 Aug 2008 02:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=XQ2gsJpaxtjMHbspHv9IhX8TSQx2Al9dzzoGizifEzU=; b=u3+1NDpEkOSjFBHPivy/3poQszIVjiRaLxXK4hVIaHtLjgmViSXJaEHuVB03GEjfUX 6Wz+r1BX63Sm29+Yk4swtKKKD9ikgFBNqBDkspdeCzI/DSrzLSVgLvQI3IvnyfQFHdVf W/TPiyVM4v0sNa3B4SCso2sUHtBPPBDiKjgnI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=Yd+XPC9EaDpWUfj9Ess7yOPbYF7bXycvqJ3DT0WzUKVS73q9dlSFxyNMEpPiK9peOz rR8/2dRobuoz8PS4UyACyZrhqBcNer1wIsA2AqrRqlfh1tSFvf5j24oiEXYo33IHZpLU dkzzN1UWjJgs4kuyh73f4MJ6HIm8Ri0wVtOBI= Received: by 10.141.113.6 with SMTP id q6mr4203813rvm.36.1218533790993; Tue, 12 Aug 2008 02:36:30 -0700 (PDT) Received: by 10.141.168.3 with HTTP; Tue, 12 Aug 2008 02:36:30 -0700 (PDT) Message-ID: <1bcb7c7f0808120236r3cc4875bj65c6b9e53253fa76@mail.gmail.com> Date: Tue, 12 Aug 2008 12:36:30 +0300 From: "Cam Bazz" To: java-user@lucene.apache.org Subject: Re: delete by doc id In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_81685_26337763.1218533790975" References: <1bcb7c7f0808081439j1a2cde9cuf241f890ac2a7f6b@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_81685_26337763.1218533790975 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I get the id's to delete from a query in indexsearcher. I think I am going trunk, hope it wont cause a lot of pain. best. -C.B. On Sat, Aug 9, 2008 at 2:30 AM, Michael McCandless < lucene@mikemccandless.com> wrote: > > It's risky. > > How would you get the IDs to know which ones to delete? A separate reader > running on the side? > > The problem is, as IndexWriter merges segments, the IDs shift. Any reader > you have already open won't see this shift (until you reopen it), so you > could end up deleting the wrong IDs. > > Mike > > > Cam Bazz wrote: > > hello, >> >> what would happen if I modified the class IndexWriter, and made the delete >> by id method public? >> >> I have two fields in my documents and I got to be able to delete by those >> two fields, (by query in other words) and I do not wish to go trunk >> version. >> >> I am getting quite desperate, and if not found a solution I will have to >> make my documents with 3 fields, a, b and a + b so I can delete by a and >> b. >> >> Best. >> >> could there be a side effect? >> >> Best. >> >> -c.b. >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > ------=_Part_81685_26337763.1218533790975--