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

Implement index management spec

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Minor Change

      Another API conformity ticket.

      The following existing method will change:

      • create_index will no longer "cache" successfully created indexes client side. create_index continues to always attempt to create an index on the server. If the index already exists this is a no-op on the server.

      The following method is deprecated:

      • ensure_index - The difference between ensure_index and create_index is that ensure_index consults an index "cache" before sending a create index operation to the server. This causes hard to debug race conditions when dropping and immediately re-creating an index, and provides no real benefits. To avoid these problems we're deprecating the method. Use create_index instead.

      The following methods are added:

      • create_indexes - like create_index but takes a list of index specs and creates multiple indexes. Only supported by MongoDB 2.6 and newer.
      • list_indexes - Returns a cursor over all indexes for the given collection.

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: