Hi,
We are doing a rolling index and would like to know on the NodeClient that the new index has been added. Is it possible to listen to an event that would indicate a new index creation?
Thanks!
Hi,
We are doing a rolling index and would like to know on the NodeClient that the new index has been added. Is it possible to listen to an event that would indicate a new index creation?
Thanks!
Yes, you can create a ClusterStateObserver with a ChangePredicate that encodes that the indices have changed. For the apply override that accepts two cluster states you have to compare ClusterState#metaData#indices and for the apply override that accepts a ClusterChangedEvent you can just inspect ClusterChangedEvent#indicesCreated.
Thanks for the prompt and useful reply!
© 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.