Get the latest index of a certain form in elasticsearch

I am periodically training an anomaly detection model and I am saving it in elasticsearch index of the form 'anomaly_detection_model-' + date_model_trained. This means that I am ending up with indices of the form: anomaly_detection_model-31.08.2022, anomaly_detection_model-29.08.2022, anomaly_detection_model-27.08.2022, etc. I need to be able to get access to the latest model at real-time in order to make the predictions without knowing what is the date that this model was trained. Do you have any ideas of how this could be possible?

GET /_cat/indices/anomaly_detection_model-*?pretty& should do it.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.