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

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 5.0.0-rc0
    • None
    • None
    • Fully Compatible
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: