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

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

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.9.0, 5.0.0, 5.2.0, 5.3.0
    • manual, Server
    • None

    Description

      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.)

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                31 weeks, 2 days ago