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

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

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Execution Team 2021-04-05

      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.

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

              Created:
              Updated:
              Resolved: