Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DCC1F200B86 for ; Sun, 4 Sep 2016 07:43:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DB40C160ACD; Sun, 4 Sep 2016 05:43:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2EC20160ABB for ; Sun, 4 Sep 2016 07:43:05 +0200 (CEST) Received: (qmail 18842 invoked by uid 500); 4 Sep 2016 05:43:03 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 18831 invoked by uid 99); 4 Sep 2016 05:43:03 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Sep 2016 05:43:03 +0000 Received: from mail-it0-f48.google.com (mail-it0-f48.google.com [209.85.214.48]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 2A2811A065A for ; Sun, 4 Sep 2016 05:43:03 +0000 (UTC) Received: by mail-it0-f48.google.com with SMTP id e124so17865830ith.0 for ; Sat, 03 Sep 2016 22:43:03 -0700 (PDT) X-Gm-Message-State: AE9vXwPDBBmr7AoBFSOeQOHzrMXWDRgiDTyk2PFdpKB6zYzIqgAgh7gsc7DsmtC9d+0Fgg8hNhO2QQAJioOI9g== X-Received: by 10.36.144.68 with SMTP id x65mr15127608itd.12.1472967782440; Sat, 03 Sep 2016 22:43:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.21.97 with HTTP; Sat, 3 Sep 2016 22:43:02 -0700 (PDT) In-Reply-To: References: From: Mikhail Khludnev Date: Sun, 4 Sep 2016 08:43:02 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Nested documents: deleting the whole subtree To: solr-user Content-Type: multipart/alternative; boundary=94eb2c07e8067028a9053ba8094c archived-at: Sun, 04 Sep 2016 05:43:06 -0000 --94eb2c07e8067028a9053ba8094c Content-Type: text/plain; charset=UTF-8 Hello Alex, Internally, _root_ field is assigned across whole block. You can use it in deleteByQuery. The value for this field is equal to parent's uniqueKey. On Sun, Sep 4, 2016 at 5:51 AM, Alexandre Rafalovitch wrote: > Hello, > > If I am correct, deleting parent document still keeps the child > documents in the index. Which means they now have dangling _root_ > references and what not. > > What's the easiest delete command to take out the parent and all its > multilevel children, when I find the parents themselves with a query? > > So far, I got: > (+type:release +release_name:"6.1.0") {!child > of=type:release}release_name:"6.1.0" > > Is there a better way I missed? > > Regards, > Alex. > P.s. Interestingly, the above query will still match children after > the parent record is still gone. Until the merge/optimize anyway. > Which shows that the deleted record filtering happens after all the > matching, not just parent's matching. > > ---- > Newsletter and resources for Solr beginners and intermediates: > http://www.solr-start.com/ > -- Sincerely yours Mikhail Khludnev --94eb2c07e8067028a9053ba8094c--