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

Validation of $meta fields is skipped for mongot queries

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • 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:
            Unassigned Unassigned
            Reporter:
            will.buerger@mongodb.com Will Buerger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: