Yaswanth
(Yaswanth )
February 27, 2017, 4:34pm
1
Hi
POST /_aliases
{
"actions" : [
{ "add" : { "index" : "test*", "alias" : "all_test" } }
]
}
1)Based on the above configuration all the indices that start with test and also that are present in the cluster at that point of time will be kept in all_test alias.
2)If i create alias in Template by using below configuration
PUT localhost:9200/_template/test -d '
{
"template" : "test*",
"aliases" : {
"all_test" : {}
}
}
This will send the future indices which starts with test* to all_test alias.
Can i able to do 1+2 = I want to send the existing indices and the future indices to particular alias which i will define in ES Template?
Thanks
jkuang
(Jimmy Kuang)
February 27, 2017, 10:37pm
2
Yes, you can do 1+2 to send the existing indices and the future indices to a particular alias which i will define in ES Template.
Yaswanth
(Yaswanth )
February 28, 2017, 2:45am
3
Thanks
Can you pls provide a sample code for the use case that i had mentioned above?
So, that i will know how to do that?
jkuang
(Jimmy Kuang)
February 28, 2017, 4:10pm
4
I just use the API call you provided in 1) and 2) . Not sure what sample code you are expecting.
Yaswanth
(Yaswanth )
February 28, 2017, 5:11pm
5
Thanks ..
That means you are executing 1+2 using api's .
But what i want is can you send the existing indices and future indices to one alias that we define in template?
Through some study i found it out that cant be possible in a template. I have to follow the above 1 and 2 steps.
system
(system)
Closed
March 28, 2017, 5:11pm
6
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.