Right. But how do I structure the query to say to match all root values that correspond to the parent entries selected by query.
Maybe I am just blanking here but how do I form the query: q=_root_:[set of id values from query (+type:release +release_name:"6.1.0")] Regards, Alex. ---- Newsletter and resources for Solr beginners and intermediates: http://www.solr-start.com/ On 4 September 2016 at 12:43, Mikhail Khludnev <m...@apache.org> wrote: > 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 <arafa...@gmail.com> > 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