Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-740

Support new $meta expressions in MongoDB 4.4

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      NODE-2174 Works as Designed
      JAVA-3445 Fixed 4.1.0
      CXX-1821 Won't Do
      CSHARP-2752 Fixed 2.11.0
      MOTOR-394 Won't Fix
      PYTHON-1987 Won't Fix
      RUBY-1941 Won't Do
      PHPC-1447 Won't Do
      CDRIVER-3372 Won't Do
      GODRIVER-1319 Won't Do
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion NODE-2174 Works as Designed JAVA-3445 Fixed 4.1.0 CXX-1821 Won't Do CSHARP-2752 Fixed 2.11.0 MOTOR-394 Won't Fix PYTHON-1987 Won't Fix RUBY-1941 Won't Do PHPC-1447 Won't Do CDRIVER-3372 Won't Do GODRIVER-1319 Won't Do

    Description

      Downstream Change Summary

      This ticket adds support for new options in the $meta expression. Currently the only documented option is "textScore." In 4.4 these will be the options:

      https://github.com/mongodb/mongo/blob/0e6b9119f4d3a0fae681ed28220bc55ed1469f81/src/mongo/db/pipeline/expression.cpp#L2528-L2536

      Note that the docs are incorrect even for 4.2 (agg) $meta. In 4.2 $meta supports "textScore", "randVal", "searchScore" and "searchHighlights."

      In 4.4 there will be no concept of "agg $meta" opposed to "find() $meta", but there will be a separate ticket about that.

      Description of Linked Ticket

      Add support for "recordId" "indexKey" and "sortKey" in ExpressionMeta.

      Like other meta types, the expression should returning "missing" if the associated metadata cannot be found on the Document.

      This ticket will also involve modifying Document and DocumentMetadataFields. The main purpose of this work is to make ExpressionMeta supercede find() $meta.

      Note that the work of figuring out how to pass metadata between the PlanStage and DocumentSource layer is tracked by SERVER-42560. This ticket is just about making $meta able to parse the new metadata options and retrieve them from a Document. Until we support expressions in find() projection, the change will not actually have any "visible" effects.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: