瀏覽代碼

Docs: Always quote "@file" argument to --data-binary

Closes #13500
Clinton Gormley 10 年之前
父節點
當前提交
fa77cf6f6f

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

@@ -56,7 +56,7 @@ newlines. Example:
 $ cat requests
 { "index" : { "_index" : "test", "_type" : "type1", "_id" : "1" } }
 { "field1" : "value1" }
-$ curl -s -XPOST localhost:9200/_bulk --data-binary @requests; echo
+$ curl -s -XPOST localhost:9200/_bulk --data-binary "@requests"; echo
 {"took":7,"items":[{"create":{"_index":"test","_type":"type1","_id":"1","_version":1}}]}
 --------------------------------------------------
 

+ 1 - 1
docs/reference/getting-started.asciidoc

@@ -544,7 +544,7 @@ You can download the sample dataset (accounts.json) from https://github.com/bly2
 
 [source,sh]
 --------------------------------------------------
-curl -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json
+curl -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary "@accounts.json"
 curl 'localhost:9200/_cat/indices?v'
 --------------------------------------------------
 

+ 1 - 1
docs/reference/search/multi-search.asciidoc

@@ -35,7 +35,7 @@ $ cat requests
 {"search_type" : "dfs_query_then_fetch"}
 {"query" : {"match_all" : {}}}
 
-$ curl -XGET localhost:9200/_msearch --data-binary @requests; echo
+$ curl -XGET localhost:9200/_msearch --data-binary "@requests"; echo
 --------------------------------------------------
 
 Note, the above includes an example of an empty header (can also be just

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

@@ -366,7 +366,7 @@ Request:
 
 [source,js]
 --------------------------------------------------
-curl -XGET 'localhost:9200/twitter/tweet/_mpercolate' --data-binary @requests.txt; echo
+curl -XGET 'localhost:9200/twitter/tweet/_mpercolate' --data-binary "@requests.txt"; echo
 --------------------------------------------------
 
 The index `twitter` is the default index, and the type `tweet` is the default type and will be used in the case a header