Browse Source

Fixed the documentation formatting. (#17990)

The source code example for the initial example was missing the correct JSON object formatting and syntax.  That has been fixed with my change.
Josef Salyer 9 years ago
parent
commit
b2ce2f5afa
1 changed files with 8 additions and 7 deletions
  1. 8 7
      docs/reference/indices/create-index.asciidoc

+ 8 - 7
docs/reference/indices/create-index.asciidoc

@@ -14,13 +14,14 @@ associated with it.
 
 [source,js]
 --------------------------------------------------
-$ curl -XPUT 'http://localhost:9200/twitter/'
-
-$ curl -XPUT 'http://localhost:9200/twitter/' -d '
-index :
-    number_of_shards : 3 <1>
-    number_of_replicas : 2 <2>
-'
+$ curl -XPUT 'http://localhost:9200/twitter/' -d '{
+    "settings" : {
+        "index" : {
+            "number_of_shards" : 3 <1>
+            "number_of_replicas" : 2 <2>
+        }
+    }
+}'
 --------------------------------------------------
 <1> Default for `number_of_shards` is 5
 <2> Default for `number_of_replicas` is 1 (ie one replica for each primary shard)