books_v1 with a simple mappingcurrent_books pointing to books_v1books_v2 with the same mappingcurrent_books to point from books_v1 to books_v2books_v1 with a simple mappingcurrent_books pointing to books_v1books_v2 with the same mappingcurrent_books to point from books_v1 to books_v2books_v1PUT request to create an index called books_v1 with a mapping that has a title field of type text.Use the PUT method with the index name books_v1 and define the mapping inside mappings.properties.
current_books for books_v1POST request to add an alias called current_books that points to the index books_v1.Use the POST /_aliases endpoint with an actions array containing an add action.
books_v2 with the same mappingbooks_v2 with the same mapping as books_v1 using a PUT request.Repeat the PUT request for books_v2 with the same mapping as books_v1.
current_books to point to books_v2POST /_aliases request to atomically remove the alias current_books from books_v1 and add it to books_v2.Use a single POST /_aliases request with actions to remove and add the alias atomically.
What is the main purpose of using index aliases in Elasticsearch?
Which of the following is the correct syntax to add an alias named logs_current to an index called logs_2024 using Elasticsearch API?
{
"actions": [
{
"add": {
"index": "logs_2024",
"alias": "logs_current"
}
}
]
}/_aliases with an actions array.Given these aliases and indexes:logs_2023, logs_2024
Alias logs_all points to both indexes.
Which index will be searched when querying logs_all?
logs_alllogs_all points to both logs_2023 and logs_2024, queries to it search both indexes.What is wrong with this alias update request?
{
"actions": [
{
"add": {
"alias": "current_logs",
"index": "logs_2024"
}
},
{
"remove": {
"alias": "old_logs",
"index": "logs_2023"
}
}
]
}/_aliases./_aliases is the correct way to update aliases.You want to switch an alias active_logs from pointing to logs_2023 to logs_2024 without downtime. Which is the best approach?
Pass the test and this pattern moves unknown