-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
ALL
This issue was found in BF-31277.
We encountered a reparsing failure during $queryStats, when we have the following find query with $geoNear:
db.col.find({geo: {$geoNear: {$geometry: {coordinates: [10,10]}}}})
Although most queries with this form specify a "type" in the $geometry operand, it is not enforced nor required. The default behaviour when parsing $geometry objects is to treat the geometry as a point. The serialization for representative shape has to default to using a point type as well to ensure we can re-parse correctly.