0

I am ingesting(using python-lambda) the data into AWS Elasticsearch cluster on a need basis. While ingesting the new data, I want to clear the old data but keep the visualizations intact. How can this be achieved?

Currently, I am using requests.delete(<url>/_all) which I want to change.

ExploringApple
  • 1,348
  • 2
  • 17
  • 30

1 Answers1

0

First: Deleting data doesn't touch the visualizations. Are you using indices to separate the data? It's always a good idea to name the indices like indexname-YYYY-MM-DD, this way you can use indexname-* as index pattern in your visualizations and it's easy to delete:

Deleting an index in Elasticsearch using python:

from elasticsearch import Elasticsearch
es = Elasticsearch()

es.indices.delete(index='indexname', ignore=[400, 404])
Faulander
  • 327
  • 3
  • 12