Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-55096

Indexes on time-series collections need to inherit collation from collection

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0.0-rc0
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Execution Team 2021-04-05

      Description

      New indexes need to inherit the default collation from the time-series collection. This is consistent with behavior for regular collections.

      This is incorrect behavior:

      > db.createCollection('ts', {timeseries: {timeField: 'time', metaField: 'meta'}, collation: {locale: 'en', strength: 1, numericOrdering: true}})
      { "ok" : 1 }
      > db.ts.createIndex({meta: 1})
      {
              "numIndexesBefore" : 0,
              "numIndexesAfter" : 1,
              "createdCollectionAutomatically" : false,
              "ok" : 1
      }
      > db.runCommand({listIndexes: "ts"})
      {
              "cursor" : {
                      "id" : NumberLong(0),
                      "ns" : "test.ts",
                      "firstBatch" : [
                              {
                                      "v" : 2,
                                      "key" : {
                                              "meta" : 1
                                      },
                                      "name" : "meta_1"
                              }
                      ]
              },
              "ok" : 1
      }
      

      Notice that the new index does not have a collation.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              benety.goh Benety Goh
              Reporter:
              louis.williams Louis Williams
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: