Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-591

CreateIndexes should not specify "ns" for index specifications

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.7.2
    • Affects Version/s: 1.0.0
    • Component/s: None
    • Labels:
      None

      CreateIndexes currently specifies the namespace as an "ns" field in the index specification document for createIndexes commands. While that was required for legacy index creation (i.e. system.indexes insertions) it has never been applicable to the createIndexes command. The server does not appear to apply strict validation and raise errors for unsupported index options; however, we'd do well to fix this in case a future version starts doing so.

      This code was introduced prior to 1.0 in 4de66e3 and was preserved when porting Collection methods to operation classes in 5b7bb9a.

      I discovered this while working on the unified test runner (PHPLIB-493), since it is more strict about matching command documents.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: