Support compound indexes on time-series metadata and measurements

XMLWordPrintableJSON

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

      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
            Reporter:
            Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: