How can we automatically delete elastic search data logs

so eventually, when you delete an index using the delete phase based on the roll size, the data inside the index will not be deleted.