Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-5971

use the value of `CreateIndexOptions.version` to specify the index version in `createIndex` helpers

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 6.6.0
    • Affects Version/s: None
    • Component/s: None
    • 2
    • Not Needed
    • Hide

      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.

      Show
      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The version option is not accepted by the server. The correct option should be "v" and its valid values are 1 or 2 instead of 0/1. This change will allow users to create legacy v:1 indexes, although this option is undocumented in the command reference.

      Considering the version option will be rejected by the server anyway, changing it to "v" should have no external impacts.

      AC:

      • When constructing the `createIndexes` command in `Collection.createIndex()` and `Collection.createIndexes()`, attach the `v` option to the command with the value of `CreateIndexOptions.version`
      • Test index creation with explicit index version

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            wei.hu@mongodb.com Wei Hu
            Warren James
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: