[SERVER-84630] $geoNear fails to re-parse when provided geometry type is invalid Created: 08/Jan/24  Updated: 18/Jan/24  Resolved: 17/Jan/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Santiago Roche Assignee: Santiago Roche
Resolution: Fixed Votes: 0
Labels: flag-for-2885-backport
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Fix
Related
is related to SERVER-84598 $geoNear allows missing or invalid Ge... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:
Linked BF Score: 35

 Description   

$geoNear queries can specify a $geometry operand without having to specify a type. This is partially because $geoNear expects a geometry of type "Point" at all times. While we may add a consistency check on the type in the future, for now we simply want to allow this type of query to re-parse correctly. This means that we should handle cases where the "type" passed in is also invalid as is the case for this BF.

In this case:

"type": 'b.c'



 Comments   
Comment by Githook User [ 17/Jan/24 ]

Author:

{'name': 'Santiago Roche', 'email': '69868136+sroches@users.noreply.github.com', 'username': 'sroches'}

Message: SERVER-84630: Default to $geometry point for $geoNear representative shape. (#17918)

GitOrigin-RevId: 3377d0cacd14ce5946c45cd8ebf9c889436f4c84
Branch: master
https://github.com/mongodb/mongo/commit/294671c7e1ca283c398fc3ea81c061f0e3ef2f9b

Generated at Thu Feb 08 06:55:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.