Is there a way to get last updated time for index? I looked up on forum and google and there used to be _timestamp field, but was deprecated. Wondering if it was replaced with something else.
Thank you.
Is there a way to get last updated time for index? I looked up on forum and google and there used to be _timestamp field, but was deprecated. Wondering if it was replaced with something else.
Thank you.
The _timestamp field was provided for documents, not an index, right? i.e. what is a last updated time for an index. The last time a document was indexed? Or the last time index settings/mappings/etc. were changed?
That's actually correct. I thought it was at index level.
But the question still remains the same, is there a way to know when was the index updated? I hope there is a way to find that out, doesn't seem that difficult of a problem to solve from what I understand about ES. Just that I don't know how to get that information.
Today this is not possible.
It's more difficult than it sounds. Since this is index metadata, the master would have to be responsible for tracking it. That means a master operation on every indexing request, which is entirely too expensive. If we relax the guarantees, we can remove the need for a master operation, but then there are consistency issues to deal with.
Jason, thank you for the details. You could consider creating a separate metadata index.
Adding to every index document and running sort query seems too expensive. I am thinking of creating another metadata index for the same like mentioned above.
Do you have a suggestion or have a better / optimal solution?
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.