Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-15993

[Server] Clarify whether "." in shard key is used for nested doc reference or field name literal

    XMLWordPrintableJSON

Details

    Description

      If I perform the following operation:

      sh.shardCollection("my_namespace", { "my.field.name": 1 })
      

      It is not clear whether the dots ('.') in "my.field.name" will be interpreted by the server for nested document path traversal (e.g. { my: { field:

      { name: "abc" }

      } }), or for the literal field name as per dot-dollar functionality. (The dot-dollar page does state that leading $ cannot be used in shard key names, but is ambiguous about dot.)

      Please kindly clarify this in the documentation; it would be good to put a note both on the shard page and the dot-dollar page.

      Attachments

        Activity

          People

            Unassigned Unassigned
            shields@tablecheck.com Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              42 weeks, 6 days ago