Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-3657

Allow explicit index name set to None

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.4
    • Affects Version/s: None
    • Component/s: None
    • None

      create_index([("hello", DESCENDING), ("world", ASCENDING)], name=None) 

      is raising this error:

      pymongo.errors.OperationFailure: Error in specification { name: null, key: { hello: -1, world: 1 } } :: caused by :: The field 'name' must be a string, but got null, full error: {'ok': 0.0, 'errmsg': "Error in specification { name: null, key: { hello: -1, world: 1 } } :: caused by :: The field 'name' must be a string, but got null", 'code': 14, 'codeName': 'TypeMismatch'} 

      And according to the docs, it should create index with auto generated name

            Assignee:
            Unassigned Unassigned
            Reporter:
            mdpgd95@gmail.com Michael Pacheco
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: