Will deletion on a parent document also delete the children document?

Hi,

As the subject title, will deletion on a parent document also delete the children document?

If not, since we manually delete the parent document and set the ttl on the children documents. Will those children be able to expire without a parent document?

As I understand, Yes. it should delete child docs if parent doc is deleted.

To be more clear,
Let's say, you have json object: { a: {b : "test"}}
if you delete a , b is also get deleted. I hope, it clarify your question.

Nested objects yes, child objects no. There is an open issue on github for that. I've used delete by query to handle the child docs.

1 Like