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

Better error message for $search when there is no search index

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible

      When running a $search on a community edition of mongodb we get the following error:

      > db.fts.aggregate([{$search:{}}])
      2021-10-05T11:33:22.188-0700 E  QUERY    [js] uncaught exception: Error: command failed: {
              "ok" : 0,
              "errmsg" : "Unrecognized pipeline stage name: '$search'",
              "code" : 40324,
              "codeName" : "Location40324"
      } : aggregate failed : 

      Instead we would want to have a more descriptive error message that $search is only available in Atlas.

       

      marcus.eagan, FYI. Also I have marked this as low priority.

            Votes:
            1 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: