Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-16634

[SERVER] Investigate changes in SERVER-84598: $geoNear allows missing or invalid GeoJSON "type" field

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • 7.3.0-rc0
    • None
    • Server

    Description

      Original Downstream Change Summary

      Just a heads up for docs that even though this behavior was technically not allowed before, it will now error.

      Description of Linked Ticket

      Most geo queries that are built on top of geometry_container do not allow an unknown or missing "type" field. However, $geoNear (match expression and agg stage) rely instead on `GeoNearExpression`, which skips the geometry_container layer, so it accepts a missing or invalid GeoJSON "type" field, and will treat it as type "Point". In fact, it would even accept the type field as any GeoJSON type, since it doesn't check the "type" field. This is misleading, and inconsistent with the other geo operators.

      As part of this ticket, we should consider incorporating geometry_container as part of GeoNearExpression to match behavior parity across geo expressions.

      Attachments

        Activity

          People

            Unassigned Unassigned
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              1 day ago