Skip to content

Commit

Permalink
Demonstrate that arrays of geo_shape can no longer be ingested
Browse files Browse the repository at this point in the history
This was first broken in commit ebe6f2c

Demonstrates opensearch-project#14193

Signed-off-by: Kurt McKee <contactme@kurtmckee.org>
  • Loading branch information
kurtmckee committed Jun 11, 2024
1 parent 4c25257 commit ce13959
Showing 1 changed file with 67 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
setup:
- do:
indices.create:
index: test
body:
settings:
number_of_replicas: 0
mappings:
properties:
location:
type: "geo_shape"

---
"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}

0 comments on commit ce13959

Please sign in to comment.