Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-14277

Investigate changes in SERVER-47657: Add 'unique' and 'sparse' parameters to index signature

      Description

      Downstream Change Summary

      unique/sparse index options are now part of index signature.

      If there's any artifacts which are aware that unique/sparse index options are not part of index signature, probably it need to be modified.

      Description of Linked Ticket

      At present, an index's signature - that is, the combination of parameters which uniquely identify the index - is defined by its keypattern and collation. No index can be created if its signature is equivalent to an existing index. SERVER-25023 seeks to add the partialFilterExpression parameter to this list, such that multiple partial indexes could be built on the same fields so long as their filters are different.

      We should also add the unique and sparse parameters to the index signature. At present, it is not possible to build a sparse index on a particular key pattern if an existing non-sparse index is already present. Users who wish to move from a full index to a sparse index have little option but to drop the existing index before building the sparse version. A similar situation exists for users who wish to introduce a uniqueness constraint on a field which is already indexed. Workarounds do exist in these situations, but they are ugly and more labour-intensive than should be necessary.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

            Assignee:
            ian.fogelman@mongodb.com Ian Fogelman
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              2 years, 8 weeks, 3 days ago