Difference between revisions of "C180913125810"

From FindAndLearn::Cookbook
C180913125810
Jump to: navigation, search
(Created page with "{{Recipe |HasEntityTitle=Aliasing }} == Show existing aliases == == Add/edit an alias == <syntaxhighlight lang=json> </syntaxhighlight>")
 
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
|HasEntityTitle=Aliasing
 
|HasEntityTitle=Aliasing
 
}}
 
}}
 +
==Show existing aliases==
  
== Show existing aliases ==
+
<syntaxhighlight lang="json">
 +
GET _cat/aliases
 +
</syntaxhighlight>
  
== Add/edit an alias ==
+
==Manage an alias==
  
<syntaxhighlight lang=json>
+
<syntaxhighlight lang="json">
 +
POST /_aliases
 +
{
 +
    "actions" : [
 +
        { "add" : { "indices" : ["test1", "test2"], "alias" : "alias1" } }
 +
    ]
 +
}
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
{{Annotation
 +
|AnnotationPredicate=RefersToElasticsearchDocumentation
 +
|AnnotationObject=https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-add-alias.html
 +
}}

Latest revision as of 14:03, 12 September 2019




Show existing aliases

GET _cat/aliases

Manage an alias

POST /_aliases
{
    "actions" : [
        { "add" : { "indices" : ["test1", "test2"], "alias" : "alias1" } }
    ]
}