Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 51F68EB1D for ; Sun, 3 Mar 2013 15:40:48 +0000 (UTC) Received: (qmail 45725 invoked by uid 500); 3 Mar 2013 15:40:46 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 45685 invoked by uid 500); 3 Mar 2013 15:40:46 -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 45670 invoked by uid 99); 3 Mar 2013 15:40:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Mar 2013 15:40:45 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.128.178] (HELO mail-ve0-f178.google.com) (209.85.128.178) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Mar 2013 15:40:40 +0000 Received: by mail-ve0-f178.google.com with SMTP id db10so4048645veb.23 for ; Sun, 03 Mar 2013 07:40:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type:x-gm-message-state; bh=2fnvqqdP0bzF0nfSelDjpRJQlvt0p94b9ukajivk4as=; b=nDlvBFzYJ46N9np4xWC7a++/5miwfPfZucP5VGGv8uC88SB+rOcneIHUFfj+F1Gh3Y 7RVp9w2+ugt+k+aJExA1x4sJ+G5IL/VIn7vJuWP2fSc/QV+peQpzJ0sSEpmZ8pLQMnf5 Q/UHzgrejJHdD1df8rqKa6qB9YNRRj/4zZZLmCXw002cMPdkagzRAGArUIdoIIA/vAK9 07sDV6QeTD+/9LIVWQs/haLFZm4xfmdBucS2fCuljVX9v8UrPylTt3F8bU1PbUHGMyWW FLYgsvsc6wRltHgHhaPV6lrHnL7aJq7SFrXVgf+uZVKvCfE1IEdcMT2CUNAuhc5sbv9/ bb2w== X-Received: by 10.220.220.134 with SMTP id hy6mr6479088vcb.2.1362325219257; Sun, 03 Mar 2013 07:40:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.212.12 with HTTP; Sun, 3 Mar 2013 07:39:59 -0800 (PST) In-Reply-To: References: From: Michael McCandless Date: Sun, 3 Mar 2013 10:39:59 -0500 Message-ID: Subject: Re: BlockJoinQuery: delete documents To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQlp8fuQxDM33dKQLmy7Ek5HHAzJTiVTTwZHIrkG64IeA95V/C0Pbcyv4slKkJ+mqL8+lPuU X-Virus-Checked: Checked by ClamAV on apache.org IndexWriter doesn't track the blocks ... so you need to something yourself. One approach is to add a Field, eg blockID, with the same value (maybe the id of the parent doc) to parent and child docs, and then delete by that. You may also get away with just deleting the parent or just the children, but this can make searches more costly as the parent/child docs will be matched only to then discover that they don't join to anything. Mike McCandless http://blog.mikemccandless.com On Sat, Mar 2, 2013 at 11:34 PM, Wei Wang wrote: > Hello, > > I understand BlockJoinQuery can be used to index nested documents with > some internal structure. And at indexing time, addDocuments is used to > create document blocks. > > In case we would like to update some data fields, we have to delete > the old document block and add the updated block. How can we delete > the old document block efficiently? It seems IndexWriter does not > track these blocks. > > Thanks, > Wei > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org