Here is an example of a document that we would like to keep:
{
"name": "Joe Bloggs",
"locations": [
{ "type": "Point", "coordinates": [1,1] },
{ "type": "Point", "coordinates": [2,2] }
]
}
A key feature of the document is that the “location” property is an array of GeoJSON points.
According to the documentation, you can define an indexing policy for an array of locations.
However, it is unclear whether spatial queries, such as ST_WITHIN
for search , can be used , for example, if any of the points in the array fall within a certain radius of the specified point.
My question is: does CosmosDB support indexing and querying spatial data when stored in an array?