Kaynağa Gözat

[DOCS] updated json responses after #4310 and #4480

 - Removed "ok": true from response examples
 - Added "created" flag to index response examples
 - Replaced exists flag with found in delete response examples
Luca Cavanna 11 yıl önce
ebeveyn
işleme
4126ae2631

+ 1 - 1
docs/reference/cat/recovery.asciidoc

@@ -14,7 +14,7 @@ of the recovery:
 [source,shell]
 --------------------------------------------------
 % curl -XPUT 192.168.56.30:9200/_settings -d'{"number_of_replicas":1}'
-{"ok":true,"acknowledged":true}
+{"acknowledged":true}
 % curl '192.168.56.30:9200/_cat/recovery?v'
 index shard   target recovered     % ip            node
 wiki1 2     68083830   7865837 11.6% 192.168.56.20 Adam II

+ 1 - 1
docs/reference/cat/shards.asciidoc

@@ -55,7 +55,7 @@ Before a shard can be used, it goes through an `INITIALIZING` state.
 [source,shell]
 --------------------------------------------------
 % curl -XPUT 192.168.56.20:9200/_settings -d'{"number_of_replicas":1}'
-{"ok":true,"acknowledged":true}
+{"acknowledged":true}
 % curl 192.168.56.20:9200/_cat/shards
 wiki1 0 p STARTED      3014 31.1mb 192.168.56.10 Stiletto
 wiki1 0 r INITIALIZING    0 14.3mb 192.168.56.30 Frankie Raye

+ 0 - 1
docs/reference/cluster/nodes-info.asciidoc

@@ -46,7 +46,6 @@ The result will look similar to:
 [source,js]
 --------------------------------------------------
 {
-  "ok" : true,
   "cluster_name" : "test-cluster-MacBook-Air-de-David.local",
   "nodes" : {
     "hJLXmY_NTrCytiIMbX4_1g" : {

+ 1 - 1
docs/reference/docs/bulk.asciidoc

@@ -39,7 +39,7 @@ $ cat requests
 { "index" : { "_index" : "test", "_type" : "type1", "_id" : "1" } }
 { "field1" : "value1" }
 $ curl -s -XPOST localhost:9200/_bulk --data-binary @requests; echo
-{"took":7,"items":[{"create":{"_index":"test","_type":"type1","_id":"1","_version":1,"ok":true}}]}
+{"took":7,"items":[{"create":{"_index":"test","_type":"type1","_id":"1","_version":1}}]}
 --------------------------------------------------
 
 Because this format uses literal `\n`'s as delimiters, please be sure

+ 0 - 1
docs/reference/docs/delete-by-query.asciidoc

@@ -24,7 +24,6 @@ commands is:
 [source,js]
 --------------------------------------------------
 {
-    "ok" : true,
     "_indices" : {
         "twitter" : { 
             "_shards" : {

+ 2 - 2
docs/reference/docs/delete.asciidoc

@@ -16,11 +16,11 @@ The result of the above delete operation is:
 [source,js]
 --------------------------------------------------
 {
-    "ok" : true,
+    "found" : true,
     "_index" : "twitter",
     "_type" : "tweet",
     "_id" : "1",
-    "found" : true
+    "_version" : 2
 }
 --------------------------------------------------
 

+ 4 - 4
docs/reference/docs/index_.asciidoc

@@ -19,11 +19,11 @@ The result of the above index operation is:
 [source,js]
 --------------------------------------------------
 {
-    "ok" : true,
     "_index" : "twitter",
     "_type" : "tweet",
     "_id" : "1",
-    "_version" : 1
+    "_version" : 1,
+    "created" : true
 }
 --------------------------------------------------
 
@@ -179,11 +179,11 @@ The result of the above index operation is:
 [source,js]
 --------------------------------------------------
 {
-    "ok" : true,
     "_index" : "twitter",
     "_type" : "tweet",
     "_id" : "6a8ca01c-7896-48e9-81cc-9f70661fcb32",
-    "_version" : 1
+    "_version" : 1,
+    "created" : true
 }
 --------------------------------------------------
 

+ 0 - 1
docs/reference/search/explain.asciidoc

@@ -27,7 +27,6 @@ This will yield the following result:
 [source,js]
 --------------------------------------------------
 {
-  "ok" : true,
   "matches" : true,
   "explanation" : {
     "value" : 0.15342641,

+ 2 - 2
docs/reference/search/percolate.asciidoc

@@ -291,11 +291,11 @@ Index response:
 [source,js]
 --------------------------------------------------
 {
-	"ok" : true,
 	"_index" : "my-index",
 	"_type" : "message",
 	"_id" : "1",
-	"_version" : 1
+	"_version" : 1,
+	"created" : true
 }
 --------------------------------------------------