I have multiple indices and each index has multiple aliases. Is there a way to search for aliases using regexp?
For example, I can use this query:
curl -XGET 'localhost:9200/_alias/2016*?pretty'
to get all aliases starting with 2016, but if I want to get all aliases starting with 2016 and 2017 (but not 2015 or 2018), how could I achieve this? I tried different variations of this:
I suspected that's the case. Do you know any other way to query aliases with one request (like search)? I can send multiple requests (e.g. one for 2016*, one for 2017*, etc) but I hoped to find a better way.
I actually ended up using the Client API for JavaScript for this. That allows using a comma-separated list of alias names. It still does not support regexp, as you said @nik9000, but it allows using "2016*,2017*" which serves my purpose.
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.