Deleting time based document -dummy

Hello;

I want to delete my document by date. I read https://www.elastic.co/guide/en/elasticsearch/client/curator/current/examples.html . It's deleting about the INDEX, not the document

Lets assume that my index name is X and i've many documents like Y1,Y2,....,Y1000000 (ten million)

If i want to delete some of Y , Elasticsearch suggest me to delete the X and it's logs for Y?

I'm so sorry for those stupid questions

When managing retention of documents, the recommended approach is often to use time based indices instead of large indices from which data periodically need to be deleted. This works particularly well for immutable data, this is the use case for which Curator was designed.

What type of data do you have? What is your use case?

Hello Christian

My fields mappings are below. I was planning to use one big indice before your reply

{
"ContentMessage":{
"type":"string"
},
"ParentID":{
"index":"not_analyzed",
"type":"string"
},
"date":{
"format":"strict_date_optional_time||epoch_millis",
"type":"date"
},
"DocumentID":{
"type":"long"
},
"DataContent":{
"type":"string"
}
}

Is it possible to you to give an example how create a time based indices for last 10 days?

Thanks for your help

Usually you use a tool like curator to create a new index every day and do
some tidying up on the old indexes. It is usually handled by making an
alias that points to the "current" index and always moving it to the next
day's index when you create a new one. Or maybe you create one weekly. Or
something like that.

hello Nik

Thank you for your answers but is there a document about how to this?

or can you provide a sample for this?

thank you for your continues help :slight_smile: