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

Return meaningful error when sharding with a compound hashed index

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 4.0.10
    • Component/s: Sharding
    • None
    • ALL

      db.c.createIndex({a:'hashed', b:1})
      

      The above returns the error message "Currently only single field hashed index supported.” which is in line with the documentation

      sh.shardCollection('test.c', {a: 'hashed', b:1})
      

      The above returns the error message "Field a can only be 1 or 'hashed'", which is not accurate.

            Assignee:
            Unassigned Unassigned
            Reporter:
            josef.ahmad@mongodb.com Josef Ahmad
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: