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

Support partial indexes

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Python Sprint 25

      Description

      MongoDB 3.2 adds support for partial indexes. PyMongo doesn't technically need any changes to support them but we should do two things:

      • Update the docs for Collection.create_index and Collection.ensure_index to list the new option, partialFilterExpression
      • Add a test to make sure the option is passed to the server properly when used (MongoDb 3.2+ only).

      For the test we can port this from jstests:

      https://github.com/mongodb/mongo/blob/master/jstests/core/index_partial_read_ops.js#L12-L37

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              anna.herlihy Anna Herlihy
              Reporter:
              behackett Bernie Hackett
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: