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

Support compound indexes on time-series metadata and measurements

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Execution Team 2021-08-09

      Compound indexes build off the ascending and descending indexes idea. A createIndexes command on a time-series collection measurement field:

      {
          createIndexes: “abc”,
          indexes: [ { key: { a : 1, b : 1 } } ]
      }
      
      

      will be equivalent to the following operation on the underlying buckets collection:

      {
          createIndexes: “system.buckets.abc”,
          indexes: [
              { key: { control.max.a : 1, control.min.a : 1,
                       control.max.b : 1, control.min.b : 1 } }
          ]
      }
      

      Additionally, a createIndexes command on a time-series collection measurement field with both ascending and descending options:

      {
          createIndexes: “abc”,
          indexes: [ { key: { a : 1, b : -1 } } ]
      }
      

      will be equivalent to the following operation on the underlying buckets collection:

      {
          createIndexes: “system.buckets.abc”,
          indexes: [
              { key: { control.max.a : 1, control.min.a : 1,
                       control.min.b : -1, control.max.b : -1 } }
          ]
      }
      
      

            Assignee:
            dan.larkin-york@mongodb.com Dan Larkin-York
            Reporter:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: