setup: - do: indices.create: index: test body: settings: number_of_replicas: 0 mappings: properties: location: type: geo_shape - do: index: index: test id: 1 body: location: "POINT (1.0 1.0)" - do: indices.refresh: {} --- "Test Geo Shape Query": - do: search: rest_total_hits_as_int: true body: query: bool: filter: geo_shape: location: shape: type: Envelope coordinates: - [-80.0, 34.0] - [43, -13.0] relation: within - match: hits.total: 1 - match: hits.hits.0._id: "1" --- "Test Exists Query on geo_shape field": - do: search: rest_total_hits_as_int: true index: test body: query: exists: field: location - match: {hits.total: 1} --- "Test retrieve geo_shape field": - do: search: index: test body: fields: [location] _source: false - match: { hits.hits.0.fields.location.0.type: "Point" } - match: { hits.hits.0.fields.location.0.coordinates: [1.0, 1.0] } - do: search: index: test body: fields: - field: location format: wkt _source: false - match: { hits.hits.0.fields.location.0: "POINT (1.0 1.0)" }