I have a requirement,  i can keep  only  few days data like last 7 days in my ES cluster.
but i want to store  the summary  data fro long time.
like number of count for any query  in every 5 minutes . so later on i can compare with any time data
This is a need that we see sometimes. Unfortunately we don't have a go-to solution for it right now. So you would have to do it on client-side and store aggregated information about the indices that you are removing somewhere.