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

Support 2dsphere indexes on time-series 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-07-26, Execution Team 2021-08-09

      For geo types, the summary stored in the control fields is not detailed enough to index it directly. Instead, we must transform the definition to use a new internal index type that is aware of the bucket structure. In particular, a measurement field will be present in the bucket document as data.a, but will hold the column-pivoted data for all measurements. Thus a definition:

      {
      	createIndexes: "abc",
      	indexes: [ { key: { "a" : "2dsphere" } } ]
      }
      

      will become:

      {
      	createIndexes: "system.buckets.abc",
      	indexes: [ { key: { "data.a" : "2dsphere_bucket" } } ]
      }
      

      The new index type will treat the field a as a column of points, and generate a region containing the points. From here out, the solution is the same as for existing geo-type indexes: create a covering for the region (using the appropriate space-filling curve library) and generate index keys from the covering.

      The new index type should be considered internal. Attempting to create the new index type directly on a non-bucket collection should result in an error. When examining the indexes on a time-series collection, it should report the original index type rather than the new transformed type. Examining the bucket collection directly should return the new type.

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

              Created:
              Updated:
              Resolved: