Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-100394

Validation of score $meta field is skipped for mongot queries

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • Fully Compatible
    • ALL

      An aggregation query like

      [{$match: {a: 1}}, {$project: {a: {$meta: "textScore"}}]
      

      fails with the error that "query requires text score metadata, but it is not available". That same type of validation occurs for "geoNearDistance" and "geoNearPoint" as well.

       

      However, if you change the pipeline to include a mongot stage like

      [{$search: {/*any $search predicate*/}}, {$project: {a: {$meta: "textScore"}}]  

      that validation is skipped.

            Assignee:
            will.buerger@mongodb.com Will Buerger
            Reporter:
            will.buerger@mongodb.com Will Buerger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: