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

Tag ranges for embedded shard keys

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.5.2
    • Component/s: Sharding
    • None

      While it is possible to use an embedded field as a shard key, it is not possible to define tag ranges for such a key.

      For example, I have set up the field "_id.ts", a timestamp, as a shard key, but defining a tag range for it

      sh.addTagRange ("ncdc.data", { "_id.ts" : MinKey }, { "_id.ts" : ISODate("2012-12-01T00:00:00") }, "archive" )
      

      results in the error "can't have . in field names [_id.ts] at src/mongo/shell/collection.js:145". This is probably an implicit restriction due to the way tag ranges are specified, but it is still unfortunate and should be possible.

            Assignee:
            Unassigned Unassigned
            Reporter:
            andre.spiegel@mongodb.com Andre Spiegel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: