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

Projecting {$meta: textScore} does not work in findAndModify

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Duplicate
    • Affects Version/s: 2.5.4
    • Fix Version/s: None
    • Component/s: Querying, Write Ops
    • Labels:
    • Operating System:
      ALL

      Description

      db.test.findAndModify({
          query: { $text: { $search: "dog" } },
          update: { $inc: { count :1} },
          fields: { score: { $meta: "textScore" } }
      })
      2014-01-20T19:29:36.927-0500 findAndModifyFailed failed: {
        "errmsg": "exception: Unsupported projection option: $meta",
        "code": 13097,
        "ok": 0
      } at src/mongo/shell/collection.js:504

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: