Cluster: M10
MongoDB version: 5.0.22
Index geo_json_test:
{
"mappings": {
"dynamic": false,
"fields": {
"geo_filter": {
"indexShapes": true,
"type": "geo"
}
}
}
}
Example of a document (Polygon around Paris):
{
"geo_filter": {
"type": "Polygon",
"is_location_exact": false,
"coordinates": [
[
[
2.464903,
48.878079
],
[
2.413622,
48.872461
],
[
2.38443,
48.902156
],
[
2.351985,
48.901493
],
[
2.319889,
48.900459
],
[
2.27749,
48.877963
],
[
2.23212,
48.869554
],
[
2.224168,
48.853442
],
[
2.262776,
48.833918
],
[
2.2865482465437545,
48.82264222452071
],
[
2.3080964747424617,
48.811586780863934
],
[
2.3632943199824012,
48.80929944307559
],
[
2.409361,
48.816633
],
[
2.458633,
48.817013
],
[
2.481826,
48.861413
],
[
2.464903,
48.878079
]
]
]
},
}
Example of the $search aggregation stage (using Mongo Compass, Point is located in the Paris centre):
{
index: 'geo_json_test',
"geoShape": {
"path": "geo_filter",
"relation": "contains",
"geometry": {
type: "Point",
coordinates: [
2.3490965777322117,
48.856739774345755
]
}
}
}
I expect this query to return this document, but there are not results.
Is there a mistake on my side or the bug on Atlas search side?
