[SERVER-85485] Fix legacy geo re-parsing for query stats. Created: 19/Jan/24  Updated: 02/Feb/24  Resolved: 23/Jan/24

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

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:
Backports
Depends
Fix
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.3
Participants:
Linked BF Score: 45

 Description   

BF-31401: Legacy geometry queries. Legacy geometry filters allow specifying a coordinate point as an embedded object, not specifying a type. The only constraint is that it must have two fields, and the first one is numeric, then it will be parsed in this manner.
For example:

{
location: { 
      "$geoIntersects": {
                        "foo": 123,
                        "blah": 1.3
          }
    }
}

"foo" is interpreted as the x-coordinate and "blah" as the y-coordinate.

BF-31462: $nearSphere filter with embedded object, which does not specify a type.

{location: {$nearSphere:{coordinates:[0,0]}}}

The geo parser code, as mentioned in previous bugs, does not check the type of the implicit geometry embedded subobject, and always parses as a geoJSONPoint.



 Comments   
Comment by Githook User [ 02/Feb/24 ]

Author:

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

Message: SERVER-85485: Fix serialization of legacy geo expressions. (#18266)

GitOrigin-RevId: 8ed89c57231f4f9b52e47cc3ebeaaebcfa349a56
Branch: v7.3
https://github.com/mongodb/mongo/commit/d75cd65a1064a7ee5263ba09f13ac2d1cd44d8b5

Comment by Githook User [ 23/Jan/24 ]

Author:

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

Message: SERVER-85485: Fix serialization of legacy geo expressions. (#18266)

GitOrigin-RevId: 534c75036adda28e95c9d896bfc52ae978c7abb9
Branch: master
https://github.com/mongodb/mongo/commit/6490db76bac5f6dd270c30a2f556c436a266a6b4

Comment by Santiago Roche [ 23/Jan/24 ]

https://github.com/10gen/mongo/pull/18266

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