Elastic Search Index

Can you guide me a automatic way to delete data/es ?
we are facing same problem and we have to manually delete it.
i would like to automate the process .
Please guide me and some sample would be nice .
Regards