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

Investigate changes in SERVER-54712: createIndexes permits weights for non-text indexes

      Description

      Downstream Change Summary

      We might have to update the docs to mention "Starting from 5.0 the 'weights' parameter is only allowed for $text indexes".

      Description of Linked Ticket

      The following are all permitted in 4.4.4, although weights are only meaningful for text indexes:

      coll.createIndex({a: 1, c: 1}, {weights: {d: 1}})
      coll.createIndex({a: 1, c: 1}, {weights: "$**"})
      coll.createIndex({a: 1, c: 1}, {weights: {}})
      coll.createIndex({a: 1, c: 1}, {weights: "$foo"}) 

      Consider banning them before we release API Version 1.

      Scope of changes

      This should also get a mention on the compatibility notes.

      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:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              2 years, 38 weeks, 1 day ago