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

Mistaken requirement that all remove ops in a sharded collection must include shard key

      In the 3.0 docs, it says:

      All remove() operations for a sharded collection that specify the justOne option must include the shard key or the _id field in the query specification. remove() operations specifying justOne in a sharded collection without the shard key or the _id field return an error.

      From 3.2 onwards, the "justOne" qualifier is omitted:

      All remove() operations for a sharded collection must include the shard key or the _id field in the query specification. remove() operations without the shard key or the _id field return an error.

      However, versions 3.2+ work the same as 3.0 – a shard key/_id is required only if justOne is true.

            Assignee:
            jeffrey.allen@mongodb.com Jeffrey Allen
            Reporter:
            eric.sommer@mongodb.com Eric Sommer
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              6 years, 10 weeks ago