From 674dd0dd21dc651f2bcf23a9d67d8466bcbc0e4d Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Thu, 13 Jun 2024 09:15:13 -0500 Subject: [PATCH] Feedback: Also test `doc_values: false` Signed-off-by: Kurt McKee --- ...0_array_of_geo_shapes_doc_values_false.yml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 modules/geo/src/yamlRestTest/resources/rest-api-spec/test/geo_shape/300_array_of_geo_shapes_doc_values_false.yml diff --git a/modules/geo/src/yamlRestTest/resources/rest-api-spec/test/geo_shape/300_array_of_geo_shapes_doc_values_false.yml b/modules/geo/src/yamlRestTest/resources/rest-api-spec/test/geo_shape/300_array_of_geo_shapes_doc_values_false.yml new file mode 100644 index 0000000000000..572a1275d41dd --- /dev/null +++ b/modules/geo/src/yamlRestTest/resources/rest-api-spec/test/geo_shape/300_array_of_geo_shapes_doc_values_false.yml @@ -0,0 +1,68 @@ +setup: + - do: + indices.create: + index: test + body: + settings: + number_of_replicas: 0 + mappings: + properties: + location: + type: "geo_shape" + doc_values: false + +--- +"Single shape": + - do: + bulk: + refresh: true + body: + - index: + _index: test + _id: 1 + - location: + type: "polygon" + coordinates: [ + [ + [ -87.0, 41.0 ], + [ -88.0, 41.0 ], + [ -88.0, 42.0 ], + [ -87.0, 42.0 ], + [ -87.0, 41.0 ], + ] + ] + + - match: {errors: false} + +--- +"Array of shapes": + - do: + bulk: + refresh: true + body: + - index: + _index: test + _id: 1 + - location: + - type: "polygon" + coordinates: [ + [ + [ -87.0, 41.0 ], + [ -88.0, 41.0 ], + [ -88.0, 42.0 ], + [ -87.0, 42.0 ], + [ -87.0, 41.0 ], + ] + ] + - type: "polygon" + coordinates: [ + [ + [ -97.0, 41.0 ], + [ -98.0, 41.0 ], + [ -98.0, 42.0 ], + [ -97.0, 42.0 ], + [ -97.0, 41.0 ], + ] + ] + + - match: {errors: false}