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

Queries on time-series views do not accept collations on indexes

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • ALL
    • Execution Team 2021-05-17

      When I query a time-series collection with the collation of an index, but not the collection, the query fails. For example:

      > db.createCollection('ts', {timeseries: {timeField: 't', metaField: 'm'}, collation: {locale: 'en'}})
      { "ok" : 1 }
      > db.ts.createIndex({m: 1, t: 1}, {collation: {locale: 'simple'}})
      {
              "numIndexesBefore" : 0,
              "numIndexesAfter" : 1,
              "createdCollectionAutomatically" : false,
              "ok" : 1
      }
      > db.ts.insert({t: new Date(), m: 1})
      WriteResult({ "nInserted" : 1 })
      > db.ts.find().collation({locale: 'en'})
      { "t" : ISODate("2021-03-30T18:33:03.090Z"), "m" : 1, "_id" : ObjectId("60636edfd8904012f6ce383d") }
      > db.ts.find().collation({locale: 'simple'})
      Error: error: {
              "ok" : 0,
              "errmsg" : "Cannot override a view's default collation",
              "code" : 167,
              "codeName" : "OptionNotSupportedOnView"
      }
      

      I think we should allow queries on time-series views to use a user-provided collation if one is supported by an index.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: