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

Improve error message for invalid hint

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.5.5
    • Affects Version/s: 2.5.4
    • Component/s: Querying
    • Labels:
      None
    • Fully Compatible

      When hinting on a non-existent index, the new query framework error message is difficult to parse and needs at least punctuation between the message and the query details. Ideally it would tell the reason as in 2.4

      In 2.4.8

      > db.c.find( {} ).hint({b:1})
      error: { "$err" : "bad hint", "code" : 10113 }
      

      In 2.5.5-pre:

      > db.c.find( {} ).hint({b:1})
      error: {
      	"$err" : "Couldn't get runner for query because: No query solutions query is ns=luke.c limit=0 skip=0\nTree: $and\nSort: {}\nProj: {}\n",
      	"code" : 17007
      }
      

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: