Browse Source

add missing `test2` index in alias example (#39212)

* missing 'test2' index example (#39055)

If I got the idea of aliases properly, I think that the index "test2" should have a reference in the example above of the following sentence:

" ... we associate the alias `alias1` to both `test` and `test2` ... "

* add PUT test2

* Update aliases.asciidoc

swap which is write/read
Tal Levy 6 years ago
parent
commit
3ac77ae1c1
1 changed files with 9 additions and 3 deletions
  1. 9 3
      docs/reference/indices/aliases.asciidoc

+ 9 - 3
docs/reference/indices/aliases.asciidoc

@@ -269,12 +269,18 @@ POST /_aliases
                  "alias" : "alias1",
                  "is_write_index" : true
             }
+        },
+        {
+            "add" : {
+                 "index" : "test2",
+                 "alias" : "alias1"
+            }
         }
     ]
 }
 --------------------------------------------------
 // CONSOLE
-// TEST[s/^/PUT test\n/]
+// TEST[s/^/PUT test\nPUT test2\n/]
 
 In this example, we associate the alias `alias1` to both `test` and `test2`, where
 `test` will be the index chosen for writing to.
@@ -311,13 +317,13 @@ POST /_aliases
             "add" : {
                  "index" : "test",
                  "alias" : "alias1",
-                 "is_write_index" : true
+                 "is_write_index" : false
             }
         }, {
             "add" : {
                  "index" : "test2",
                  "alias" : "alias1",
-                 "is_write_index" : false
+                 "is_write_index" : true
             }
         }
     ]