# Can not to delete child document

**URL:** <https://discuss.elastic.co/t/can-not-to-delete-child-document/262064>\
**Category:** Logstash\
**Created:** [January 25, 2021, 8:00am UTC](https://discuss.elastic.co/t/can-not-to-delete-child-document/262064 "2021-01-25T08:00:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mamo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mamo/32/82830_2.png) [@Mamo](https://discuss.elastic.co/u/Mamo)\
**Post date:** [January 25, 2021, 8:00am UTC](https://discuss.elastic.co/t/can-not-to-delete-child-document/262064/1 "2021-01-25T08:00:32Z")

</div>

logstash version: 6.4.2  
elasticsearch version: 6.4.2

```auto
output {
  elasticsearch {
    host => [...]
    action => "delete"
    index => "test"
    document_id => "%{childId}"
    routing => "%{parentId}"
  }
}

```

or

```auto
output {
      elasticsearch {
        host => [...]
        action => "delete"
        index => "test"
        document_id => "%{childId}"
        parent => "%{parentId}"
      }
    }

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 22, 2021, 8:00am UTC](https://discuss.elastic.co/t/can-not-to-delete-child-document/262064/2 "2021-02-22T08:00:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
