Skip to content

Commit 4bca06f

Browse files
use $ELASTICSEARCH_URL in curl examples
1 parent 50b6641 commit 4bca06f

File tree

648 files changed

+649
-678
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

648 files changed

+649
-678
lines changed

specification/_global/bulk/examples/request/BulkRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,4 @@ alternatives:
185185
"curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d
186186
'[{\"index\":{\"_index\":\"test\",\"_id\":\"1\"}},{\"field1\":\"value1\"},{\"delete\":{\"_index\":\"test\",\"_id\":\"2\"}},{\
187187
\"create\":{\"_index\":\"test\",\"_id\":\"3\"}},{\"field1\":\"value3\"},{\"update\":{\"_id\":\"1\",\"_index\":\"test\"}},{\"d\
188-
oc\":{\"field2\":\"value2\"}}]' \"http://localhost:9200/_bulk\""
188+
oc\":{\"field2\":\"value2\"}}]' \"$ELASTICSEARCH_URL/_bulk\""

specification/_global/bulk/examples/request/BulkRequestExample2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,4 +330,4 @@ alternatives:
330330
params.param1\",\"lang\":\"painless\",\"params\":{\"param1\":1}},\"upsert\":{\"counter\":1}},{\"update\":{\"_id\":\"2\",\"_in\
331331
dex\":\"index1\",\"retry_on_conflict\":3}},{\"doc\":{\"field\":\"value\"},\"doc_as_upsert\":true},{\"update\":{\"_id\":\"3\",\
332332
\"_index\":\"index1\",\"_source\":true}},{\"doc\":{\"field\":\"value\"}},{\"update\":{\"_id\":\"4\",\"_index\":\"index1\"}},{\
333-
\"doc\":{\"field\":\"value\"},\"_source\":true}]' \"http://localhost:9200/_bulk\""
333+
\"doc\":{\"field\":\"value\"},\"_source\":true}]' \"$ELASTICSEARCH_URL/_bulk\""

specification/_global/bulk/examples/request/BulkRequestExample3.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,4 +168,4 @@ alternatives:
168168
"curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d
169169
'[{\"update\":{\"_id\":\"5\",\"_index\":\"index1\"}},{\"doc\":{\"my_field\":\"foo\"}},{\"update\":{\"_id\":\"6\",\"_index\":\
170170
\"index1\"}},{\"doc\":{\"my_field\":\"foo\"}},{\"create\":{\"_id\":\"7\",\"_index\":\"index1\"}},{\"my_field\":\"foo\"}]'
171-
\"http://localhost:9200/_bulk\""
171+
\"$ELASTICSEARCH_URL/_bulk\""

specification/_global/bulk/examples/request/BulkRequestExample4.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,4 @@ alternatives:
153153
'[{\"index\":{\"_index\":\"my_index\",\"_id\":\"1\",\"dynamic_templates\":{\"work_location\":\"geo_point\"}}},{\"field\":\"va\
154154
lue1\",\"work_location\":\"41.12,-71.34\",\"raw_location\":\"41.12,-71.34\"},{\"create\":{\"_index\":\"my_index\",\"_id\":\"2\
155155
\",\"dynamic_templates\":{\"home_location\":\"geo_point\"}}},{\"field\":\"value2\",\"home_location\":\"41.12,-71.34\"}]'
156-
\"http://localhost:9200/_bulk\""
156+
\"$ELASTICSEARCH_URL/_bulk\""

specification/_global/clear_scroll/examples/request/ClearScrollRequestExample1.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,4 @@ alternatives:
3434
- language: curl
3535
code:
3636
'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
37-
''{"scroll_id":"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="}''
38-
"http://localhost:9200/_search/scroll"'
37+
''{"scroll_id":"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="}'' "$ELASTICSEARCH_URL/_search/scroll"'

specification/_global/close_point_in_time/examples/request/ClosePointInTimeRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ alternatives:
3535
code:
3636
"curl -X DELETE -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d
3737
'{\"id\":\"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAA\
38-
AAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"}' \"http://localhost:9200/_pit\""
38+
AAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==\"}' \"$ELASTICSEARCH_URL/_pit\""

specification/_global/count/examples/request/CountRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ alternatives:
5858
- language: curl
5959
code:
6060
'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
61-
''{"query":{"term":{"user.id":"kimchy"}}}'' "http://localhost:9200/my-index-000001/_count"'
61+
''{"query":{"term":{"user.id":"kimchy"}}}'' "$ELASTICSEARCH_URL/my-index-000001/_count"'

specification/_global/create/examples/request/CreateRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ alternatives:
6868
code:
6969
'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
7070
''{"@timestamp":"2099-11-15T13:12:00","message":"GET /search HTTP/1.1 200 1070000","user":{"id":"kimchy"}}''
71-
"http://localhost:9200/my-index-000001/_create/1"'
71+
"$ELASTICSEARCH_URL/my-index-000001/_create/1"'

specification/_global/delete/examples/request/DeleteRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ alternatives:
2525
"id" => "1",
2626
]);
2727
- language: curl
28-
code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "http://localhost:9200/my-index-000001/_doc/1"'
28+
code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001/_doc/1"'

specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ alternatives:
4848
- language: curl
4949
code:
5050
'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
51-
''{"query":{"match_all":{}}}'' "http://localhost:9200/my-index-000001,my-index-000002/_delete_by_query"'
51+
''{"query":{"match_all":{}}}'' "$ELASTICSEARCH_URL/my-index-000001,my-index-000002/_delete_by_query"'

specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ alternatives:
6363
- language: curl
6464
code:
6565
'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
66-
''{"query":{"term":{"user.id":"kimchy"}},"max_docs":1}'' "http://localhost:9200/my-index-000001/_delete_by_query"'
66+
''{"query":{"term":{"user.id":"kimchy"}},"max_docs":1}'' "$ELASTICSEARCH_URL/my-index-000001/_delete_by_query"'

specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample3.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ alternatives:
9090
code:
9191
'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
9292
''{"slice":{"id":0,"max":2},"query":{"range":{"http.response.bytes":{"lt":2000000}}}}''
93-
"http://localhost:9200/my-index-000001/_delete_by_query"'
93+
"$ELASTICSEARCH_URL/my-index-000001/_delete_by_query"'

specification/_global/delete_by_query/examples/request/DeleteByQueryRequestExample4.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ alternatives:
7979
code:
8080
'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
8181
''{"query":{"range":{"http.response.bytes":{"lt":2000000}}}}''
82-
"http://localhost:9200/my-index-000001/_delete_by_query?refresh&slices=5"'
82+
"$ELASTICSEARCH_URL/my-index-000001/_delete_by_query?refresh&slices=5"'

specification/_global/delete_by_query_rethrottle/examples/request/DeleteByQueryRethrottleRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ alternatives:
2626
]);
2727
- language: curl
2828
code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY"
29-
"http://localhost:9200/_delete_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1"'
29+
"$ELASTICSEARCH_URL/_delete_by_query/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1"'

specification/_global/delete_script/examples/request/DeleteScriptRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ alternatives:
2121
"id" => "my-search-template",
2222
]);
2323
- language: curl
24-
code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "http://localhost:9200/_scripts/my-search-template"'
24+
code: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_scripts/my-search-template"'

specification/_global/exists/examples/request/DocumentExistsRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ alternatives:
2525
"id" => "0",
2626
]);
2727
- language: curl
28-
code: 'curl --head -H "Authorization: ApiKey $ELASTIC_API_KEY" "http://localhost:9200/my-index-000001/_doc/0"'
28+
code: 'curl --head -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001/_doc/0"'

specification/_global/exists_source/examples/request/ExistsSourceRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ alternatives:
2525
"id" => "1",
2626
]);
2727
- language: curl
28-
code: 'curl --head -H "Authorization: ApiKey $ELASTIC_API_KEY" "http://localhost:9200/my-index-000001/_source/1"'
28+
code: 'curl --head -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001/_source/1"'

specification/_global/explain/examples/request/ExplainRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ alternatives:
6262
- language: curl
6363
code:
6464
'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
65-
''{"query":{"match":{"message":"elasticsearch"}}}'' "http://localhost:9200/my-index-000001/_explain/0"'
65+
''{"query":{"match":{"message":"elasticsearch"}}}'' "$ELASTICSEARCH_URL/my-index-000001/_explain/0"'

specification/_global/field_caps/examples/request/FieldCapabilitiesRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ alternatives:
7575
code:
7676
'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
7777
''{"index_filter":{"range":{"@timestamp":{"gte":"2018"}}}}''
78-
"http://localhost:9200/my-index-*/_field_caps?fields=rating"'
78+
"$ELASTICSEARCH_URL/my-index-*/_field_caps?fields=rating"'

specification/_global/get/examples/request/GetRequestExample2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ alternatives:
3030
]);
3131
- language: curl
3232
code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY"
33-
"http://localhost:9200/my-index-000001/_doc/1?stored_fields=tags,counter"'
33+
"$ELASTICSEARCH_URL/my-index-000001/_doc/1?stored_fields=tags,counter"'

specification/_global/get_script/examples/request/GetScriptRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ alternatives:
2121
"id" => "my-search-template",
2222
]);
2323
- language: curl
24-
code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "http://localhost:9200/_scripts/my-search-template"'
24+
code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_scripts/my-search-template"'

specification/_global/get_script_context/examples/request/GetScriptContextRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ alternatives:
99
- language: PHP
1010
code: $resp = $client->getScriptContext();
1111
- language: curl
12-
code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "http://localhost:9200/_script_context"'
12+
code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_script_context"'

specification/_global/get_script_languages/examples/request/GetScriptLanguagesRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ alternatives:
99
- language: PHP
1010
code: $resp = $client->getScriptLanguages();
1111
- language: curl
12-
code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "http://localhost:9200/_script_language"'
12+
code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_script_language"'

specification/_global/get_source/examples/request/GetSourceRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ alternatives:
2525
"id" => "1",
2626
]);
2727
- language: curl
28-
code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "http://localhost:9200/my-index-000001/_source/1"'
28+
code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index-000001/_source/1"'

specification/_global/health_report/examples/request/HealthReportRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ alternatives:
99
- language: PHP
1010
code: $resp = $client->healthReport();
1111
- language: curl
12-
code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "http://localhost:9200/_health_report"'
12+
code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_health_report"'

specification/_global/index/examples/request/IndexRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ alternatives:
6565
code:
6666
'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
6767
''{"@timestamp":"2099-11-15T13:12:00","message":"GET /search HTTP/1.1 200 1070000","user":{"id":"kimchy"}}''
68-
"http://localhost:9200/my-index-000001/_doc/"'
68+
"$ELASTICSEARCH_URL/my-index-000001/_doc/"'

specification/_global/index/examples/request/IndexRequestExample2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ alternatives:
6868
code:
6969
'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
7070
''{"@timestamp":"2099-11-15T13:12:00","message":"GET /search HTTP/1.1 200 1070000","user":{"id":"kimchy"}}''
71-
"http://localhost:9200/my-index-000001/_doc/1"'
71+
"$ELASTICSEARCH_URL/my-index-000001/_doc/1"'

specification/_global/info/examples/request/RootNodeInfoRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ alternatives:
99
- language: PHP
1010
code: $resp = $client->info();
1111
- language: curl
12-
code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "http://localhost:9200/"'
12+
code: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/"'

specification/_global/mget/examples/request/MultiGetRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ alternatives:
7575
- language: curl
7676
code:
7777
'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
78-
''{"docs":[{"_id":"1"},{"_id":"2"}]}'' "http://localhost:9200/my-index-000001/_mget"'
78+
''{"docs":[{"_id":"1"},{"_id":"2"}]}'' "$ELASTICSEARCH_URL/my-index-000001/_mget"'

specification/_global/mget/examples/request/MultiGetRequestExample2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,4 @@ alternatives:
154154
"curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d
155155
'{\"docs\":[{\"_index\":\"test\",\"_id\":\"1\",\"_source\":false},{\"_index\":\"test\",\"_id\":\"2\",\"_source\":[\"field3\",\
156156
\"field4\"]},{\"_index\":\"test\",\"_id\":\"3\",\"_source\":{\"include\":[\"user\"],\"exclude\":[\"user.location\"]}}]}'
157-
\"http://localhost:9200/_mget\""
157+
\"$ELASTICSEARCH_URL/_mget\""

specification/_global/mget/examples/request/MultiGetRequestExample3.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@ alternatives:
109109
code:
110110
"curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d
111111
'{\"docs\":[{\"_index\":\"test\",\"_id\":\"1\",\"stored_fields\":[\"field1\",\"field2\"]},{\"_index\":\"test\",\"_id\":\"2\",\
112-
\"stored_fields\":[\"field3\",\"field4\"]}]}' \"http://localhost:9200/_mget\""
112+
\"stored_fields\":[\"field3\",\"field4\"]}]}' \"$ELASTICSEARCH_URL/_mget\""

specification/_global/mget/examples/request/MultiGetRequestExample4.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ alternatives:
9292
code:
9393
'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
9494
''{"docs":[{"_index":"test","_id":"1","routing":"key2"},{"_index":"test","_id":"2"}]}''
95-
"http://localhost:9200/_mget?routing=key1"'
95+
"$ELASTICSEARCH_URL/_mget?routing=key1"'

specification/_global/msearch/examples/request/MsearchRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ alternatives:
102102
code:
103103
'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
104104
''[{},{"query":{"match":{"message":"this is a test"}}},{"index":"my-index-000002"},{"query":{"match_all":{}}}]''
105-
"http://localhost:9200/my-index-000001/_msearch"'
105+
"$ELASTICSEARCH_URL/my-index-000001/_msearch"'

specification/_global/msearch_template/examples/request/MultiSearchTemplateRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@ alternatives:
105105
'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
106106
''[{},{"id":"my-search-template","params":{"query_string":"hello
107107
world","from":0,"size":10}},{},{"id":"my-other-search-template","params":{"query_type":"match_all"}}]''
108-
"http://localhost:9200/my-index/_msearch/template"'
108+
"$ELASTICSEARCH_URL/my-index/_msearch/template"'

specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,4 @@ alternatives:
9494
code:
9595
'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
9696
''{"docs":[{"_id":"2","fields":["message"],"term_statistics":true},{"_id":"1"}]}''
97-
"http://localhost:9200/my-index-000001/_mtermvectors"'
97+
"$ELASTICSEARCH_URL/my-index-000001/_mtermvectors"'

specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ alternatives:
6868
code:
6969
'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
7070
''{"ids":["1","2"],"fields":["message"],"term_statistics":true}''
71-
"http://localhost:9200/my-index-000001/_mtermvectors"'
71+
"$ELASTICSEARCH_URL/my-index-000001/_mtermvectors"'

specification/_global/mtermvectors/examples/request/MultiTermVectorsRequestExample3.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,4 @@ alternatives:
102102
code:
103103
'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
104104
''{"docs":[{"_index":"my-index-000001","doc":{"message":"test test
105-
test"}},{"_index":"my-index-000001","doc":{"message":"Another test ..."}}]}''
106-
"http://localhost:9200/_mtermvectors"'
105+
test"}},{"_index":"my-index-000001","doc":{"message":"Another test ..."}}]}'' "$ELASTICSEARCH_URL/_mtermvectors"'

specification/_global/open_point_in_time/examples/request/OpenPointInTimeRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ alternatives:
3030
]);
3131
- language: curl
3232
code: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY"
33-
"http://localhost:9200/my-index-000001/_pit?keep_alive=1m&allow_partial_search_results=true"'
33+
"$ELASTICSEARCH_URL/my-index-000001/_pit?keep_alive=1m&allow_partial_search_results=true"'

specification/_global/put_script/examples/request/PutScriptRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ alternatives:
9595
code:
9696
"curl -X PUT -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d
9797
'{\"script\":{\"lang\":\"mustache\",\"source\":{\"query\":{\"match\":{\"message\":\"{{query_string}}\"}},\"from\":\"{{from}}\
98-
\",\"size\":\"{{size}}\"}}}' \"http://localhost:9200/_scripts/my-search-template\""
98+
\",\"size\":\"{{size}}\"}}}' \"$ELASTICSEARCH_URL/_scripts/my-search-template\""

specification/_global/put_script/examples/request/PutScriptRequestExample2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ alternatives:
5555
code:
5656
'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
5757
''{"script":{"lang":"painless","source":"Math.log(_score * 2) + params[''"''"''my_modifier''"''"'']"}}''
58-
"http://localhost:9200/_scripts/my-stored-script"'
58+
"$ELASTICSEARCH_URL/_scripts/my-stored-script"'

specification/_global/rank_eval/examples/request/RankEvalRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,4 @@ alternatives:
119119
"curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d
120120
'{\"requests\":[{\"id\":\"JFK
121121
query\",\"request\":{\"query\":{\"match_all\":{}}},\"ratings\":[]}],\"metric\":{\"precision\":{\"k\":20,\"relevant_rating_thr\
122-
eshold\":1,\"ignore_unlabeled\":false}}}' \"http://localhost:9200/my-index-000001/_rank_eval\""
122+
eshold\":1,\"ignore_unlabeled\":false}}}' \"$ELASTICSEARCH_URL/my-index-000001/_rank_eval\""

specification/_global/reindex/examples/request/ReindexRequestExample1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ alternatives:
7171
code:
7272
'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
7373
''{"source":{"index":["my-index-000001","my-index-000002"]},"dest":{"index":"my-new-index-000002"}}''
74-
"http://localhost:9200/_reindex"'
74+
"$ELASTICSEARCH_URL/_reindex"'

specification/_global/reindex/examples/request/ReindexRequestExample10.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ alternatives:
9595
"curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d
9696
'{\"source\":{\"index\":\"metricbeat-*\"},\"dest\":{\"index\":\"metricbeat\"},\"script\":{\"lang\":\"painless\",\"source\":\"\
9797
ctx._index = '\"'\"'metricbeat-'\"'\"' + (ctx._index.substring('\"'\"'metricbeat-'\"'\"'.length(), ctx._index.length())) +
98-
'\"'\"'-1'\"'\"'\"}}' \"http://localhost:9200/_reindex\""
98+
'\"'\"'-1'\"'\"'\"}}' \"$ELASTICSEARCH_URL/_reindex\""

specification/_global/reindex/examples/request/ReindexRequestExample11.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@ alternatives:
110110
code:
111111
"curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d
112112
'{\"max_docs\":10,\"source\":{\"index\":\"my-index-000001\",\"query\":{\"function_score\":{\"random_score\":{},\"min_score\":\
113-
0.9}}},\"dest\":{\"index\":\"my-new-index-000001\"}}' \"http://localhost:9200/_reindex\""
113+
0.9}}},\"dest\":{\"index\":\"my-new-index-000001\"}}' \"$ELASTICSEARCH_URL/_reindex\""

specification/_global/reindex/examples/request/ReindexRequestExample12.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ alternatives:
9999
"curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d
100100
'{\"source\":{\"index\":\"my-index-000001\"},\"dest\":{\"index\":\"my-new-index-000001\",\"version_type\":\"external\"},\"scr\
101101
ipt\":{\"source\":\"if (ctx._source.foo == '\"'\"'bar'\"'\"') {ctx._version++;
102-
ctx._source.remove('\"'\"'foo'\"'\"')}\",\"lang\":\"painless\"}}' \"http://localhost:9200/_reindex\""
102+
ctx._source.remove('\"'\"'foo'\"'\"')}\",\"lang\":\"painless\"}}' \"$ELASTICSEARCH_URL/_reindex\""

specification/_global/reindex/examples/request/ReindexRequestExample13.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,4 @@ alternatives:
128128
"curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d
129129
'{\"source\":{\"remote\":{\"host\":\"http://otherhost:9200\",\"username\":\"user\",\"password\":\"pass\"},\"index\":\"my-inde\
130130
x-000001\",\"query\":{\"match\":{\"test\":\"data\"}}},\"dest\":{\"index\":\"my-new-index-000001\"}}'
131-
\"http://localhost:9200/_reindex\""
131+
\"$ELASTICSEARCH_URL/_reindex\""

specification/_global/reindex/examples/request/ReindexRequestExample2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@ alternatives:
8181
code:
8282
'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
8383
''{"source":{"index":"my-index-000001","slice":{"id":0,"max":2}},"dest":{"index":"my-new-index-000001"}}''
84-
"http://localhost:9200/_reindex"'
84+
"$ELASTICSEARCH_URL/_reindex"'

specification/_global/reindex/examples/request/ReindexRequestExample3.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ alternatives:
7676
code:
7777
'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
7878
''{"source":{"index":"my-index-000001"},"dest":{"index":"my-new-index-000001"}}''
79-
"http://localhost:9200/_reindex?slices=5&refresh"'
79+
"$ELASTICSEARCH_URL/_reindex?slices=5&refresh"'

specification/_global/reindex/examples/request/ReindexRequestExample4.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@ alternatives:
105105
code:
106106
"curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d
107107
'{\"source\":{\"index\":\"source\",\"query\":{\"match\":{\"company\":\"cat\"}}},\"dest\":{\"index\":\"dest\",\"routing\":\"=c\
108-
at\"}}' \"http://localhost:9200/_reindex\""
108+
at\"}}' \"$ELASTICSEARCH_URL/_reindex\""

specification/_global/reindex/examples/request/ReindexRequestExample5.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ alternatives:
7272
code:
7373
'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d
7474
''{"source":{"index":"source"},"dest":{"index":"dest","pipeline":"some_ingest_pipeline"}}''
75-
"http://localhost:9200/_reindex"'
75+
"$ELASTICSEARCH_URL/_reindex"'

specification/_global/reindex/examples/request/ReindexRequestExample6.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@ alternatives:
9898
code:
9999
"curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d
100100
'{\"source\":{\"index\":\"my-index-000001\",\"query\":{\"term\":{\"user.id\":\"kimchy\"}}},\"dest\":{\"index\":\"my-new-index\
101-
-000001\"}}' \"http://localhost:9200/_reindex\""
101+
-000001\"}}' \"$ELASTICSEARCH_URL/_reindex\""

0 commit comments

Comments
 (0)