Hello,
I'm trying to setup our ES with index aliassing and filtering. I'm getting unclear results when using the /_aliases endpoint to setup new aliases.
Based on the examples on the site, I've tried to get this to work.
PUT users/_alias/user_12
{
"filter" : {
"term": { "user_id" : "12" }
}
}
GET /user_12/_search
=> This does return the 'filtered' results using the term above
From my point of view, the code below should do exactly the same. However this doesnt return any results:
POST /_aliases
{
"actions" : [{
"add" : {
"index" : "users",
"alias" : "user_12",
"filter" : { "term" : { "user_id" : "12" } }
}
}]
}
The 'filter' isnt stored when using the method above:
GET /_aliases
==>
{
"users": {
"aliases": {
"user_12": {}
}
}
}
What am I missing here?