It`s possible to create one alias to more than one index??
Example:
I have one index for each state in the world, but I wanna create one alias for country,
So if I search in Brazil he will search in +/- 28 index.
tks
It`s possible to create one alias to more than one index??
Example:
I have one index for each state in the world, but I wanna create one alias for country,
So if I search in Brazil he will search in +/- 28 index.
tks
FRom the docs indices alias:
curl -XPOST 'http://localhost:9200/_aliases' -d ' { "actions" : [ { "add" : { "index" : "test1", "alias" : "alias1" } }, { "add" : { "index" : "test2", "alias" : "alias1" } } ] }'
In you case you just add a filter on country eg.
curl -XPOST 'http://localhost:9200/_aliases' -d ' { "actions" : [ { "add" : { "index" : "test1", "alias" : "brazil" ,"filter" : { "term" : { "country" : "brazil" }} }, { "add" : { "index" : "test2", "alias" : "brazil" ,"filter" : { "term" : { "country" : "brazil" }} } [...]
© 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.