From 97606850e8e278efde6d4de15d878e7dc64943b4 Mon Sep 17 00:00:00 2001 From: Clinton Gormley Date: Mon, 28 Mar 2016 12:18:19 +0200 Subject: [PATCH] Renamed update-by-query REST spec to update_by_query --- .../10_basic.yaml | 14 +++++++------- .../20_validation.yaml | 6 +++--- .../30_new_fields.yaml | 2 +- .../40_versioning.yaml | 4 ++-- .../50_consistency.yaml | 4 ++-- .../{update-by-query.json => update_by_query.json} | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) rename modules/reindex/src/test/resources/rest-api-spec/test/{update-by-query => update_by_query}/10_basic.yaml (96%) rename modules/reindex/src/test/resources/rest-api-spec/test/{update-by-query => update_by_query}/20_validation.yaml (92%) rename modules/reindex/src/test/resources/rest-api-spec/test/{update-by-query => update_by_query}/30_new_fields.yaml (97%) rename modules/reindex/src/test/resources/rest-api-spec/test/{update-by-query => update_by_query}/40_versioning.yaml (82%) rename modules/reindex/src/test/resources/rest-api-spec/test/{update-by-query => update_by_query}/50_consistency.yaml (95%) rename rest-api-spec/src/main/resources/rest-api-spec/api/{update-by-query.json => update_by_query.json} (99%) diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/10_basic.yaml b/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/10_basic.yaml similarity index 96% rename from modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/10_basic.yaml rename to modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/10_basic.yaml index 5b4df1c923d..083cb44d01f 100644 --- a/modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/10_basic.yaml +++ b/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/10_basic.yaml @@ -10,7 +10,7 @@ indices.refresh: {} - do: - update-by-query: + update_by_query: index: test - is_false: timed_out - match: {updated: 1} @@ -35,7 +35,7 @@ indices.refresh: {} - do: - update-by-query: + update_by_query: wait_for_completion: false index: test - match: {task: '/.+:\d+/'} @@ -79,7 +79,7 @@ - do: catch: conflict - update-by-query: + update_by_query: index: test - match: {updated: 0} - match: {version_conflicts: 1} @@ -119,7 +119,7 @@ body: { "text": "test2" } - do: - update-by-query: + update_by_query: index: test conflicts: proceed - match: {updated: 0} @@ -148,7 +148,7 @@ indices.refresh: {} - do: - update-by-query: + update_by_query: index: twitter body: query: @@ -178,7 +178,7 @@ indices.refresh: {} - do: - update-by-query: + update_by_query: index: twitter size: 1 - match: {updated: 1} @@ -218,7 +218,7 @@ indices.refresh: {} - do: - update-by-query: + update_by_query: index: test scroll_size: 1 - match: {batches: 3} diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/20_validation.yaml b/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/20_validation.yaml similarity index 92% rename from modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/20_validation.yaml rename to modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/20_validation.yaml index f8cd16792e2..175ec65903a 100644 --- a/modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/20_validation.yaml +++ b/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/20_validation.yaml @@ -8,7 +8,7 @@ body: { "text": "test" } - do: catch: /conflicts may only be .* but was \[cat\]/ - update-by-query: + update_by_query: index: test conflicts: cat @@ -22,7 +22,7 @@ body: { "text": "test" } - do: catch: /Failed to parse int parameter \[scroll_size\] with value \[cat\]/ - update-by-query: + update_by_query: index: test scroll_size: cat @@ -36,6 +36,6 @@ body: { "text": "test" } - do: catch: /size should be greater than 0 if the request is limited to some number of documents or -1 if it isn't but it was \[-4\]/ - update-by-query: + update_by_query: index: test size: -4 diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/30_new_fields.yaml b/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/30_new_fields.yaml similarity index 97% rename from modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/30_new_fields.yaml rename to modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/30_new_fields.yaml index 22612b7f71b..fc6141cae53 100644 --- a/modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/30_new_fields.yaml +++ b/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/30_new_fields.yaml @@ -43,7 +43,7 @@ - match: { hits.total: 0 } - do: - update-by-query: + update_by_query: index: test - do: indices.refresh: {} diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/40_versioning.yaml b/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/40_versioning.yaml similarity index 82% rename from modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/40_versioning.yaml rename to modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/40_versioning.yaml index 24cbef1a25c..ac1cbe4417e 100644 --- a/modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/40_versioning.yaml +++ b/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/40_versioning.yaml @@ -1,5 +1,5 @@ --- -"update-by-query increments the version number": +"update_by_query increments the version number": - do: index: index: test @@ -10,7 +10,7 @@ indices.refresh: {} - do: - update-by-query: + update_by_query: index: test - match: {updated: 1} - match: {version_conflicts: 0} diff --git a/modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/50_consistency.yaml b/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/50_consistency.yaml similarity index 95% rename from modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/50_consistency.yaml rename to modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/50_consistency.yaml index dc8e3dcb33e..96c1e70c89f 100644 --- a/modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/50_consistency.yaml +++ b/modules/reindex/src/test/resources/rest-api-spec/test/update_by_query/50_consistency.yaml @@ -21,14 +21,14 @@ - do: catch: unavailable - update-by-query: + update_by_query: index: test timeout: 1s - match: failures.0.cause.reason: /Not.enough.active.copies.to.meet.write.consistency.of.\[QUORUM\].\(have.1,.needed.4\)..Timeout\:.\[1s\],.request:.\[BulkShardRequest.to.\[test\].containing.\[1\].requests\]/ - do: - update-by-query: + update_by_query: index: test consistency: one - match: {failures: []} diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/update-by-query.json b/rest-api-spec/src/main/resources/rest-api-spec/api/update_by_query.json similarity index 99% rename from rest-api-spec/src/main/resources/rest-api-spec/api/update-by-query.json rename to rest-api-spec/src/main/resources/rest-api-spec/api/update_by_query.json index fe7fdf8a840..e6048efd35d 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/api/update-by-query.json +++ b/rest-api-spec/src/main/resources/rest-api-spec/api/update_by_query.json @@ -1,5 +1,5 @@ { - "update-by-query": { + "update_by_query": { "documentation": "https://www.elastic.co/guide/en/elasticsearch/plugins/master/plugins-reindex.html", "methods": ["POST"], "url": {