浏览代码

Renamed update-by-query REST spec to update_by_query

Clinton Gormley 9 年之前
父节点
当前提交
97606850e8

+ 7 - 7
modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/10_basic.yaml → 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}

+ 3 - 3
modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/20_validation.yaml → 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

+ 1 - 1
modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/30_new_fields.yaml → 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: {}

+ 2 - 2
modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/40_versioning.yaml → 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}

+ 2 - 2
modules/reindex/src/test/resources/rest-api-spec/test/update-by-query/50_consistency.yaml → 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: []}

+ 1 - 1
rest-api-spec/src/main/resources/rest-api-spec/api/update-by-query.json → 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": {