Skip to content

DOCSP-14387 Removing incorrect example #4905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions source/reference/method/sh.updateZoneKeyRange.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,38 +219,6 @@ with the ``alpha`` zone:
"alpha"
)

If you wanted to create a range on values of ``b`` only, you must specify
the entire range of ``a`` when creating ranges. For example, the following
operations create two ranges on ``b`` and associates them to the
``beta`` zone.

.. note::

The previously defined range conflicts with the ranges defined in this
example. Issue the :method:`sh.removeRangeFromZone()` operation to remove an
existing conflicting range.

.. code-block:: javascript

sh.updateZoneKeyRange(
"exampledb.collection",
{ a : MinKey, b : 1 },
{ a : MaxKey, b: 10 },
"alpha"
);

sh.updateZoneKeyRange(
"exampledb.collection",
{ a : MinKey, b : 10 },
{ a : MaxKey, b: 20 },
"beta"
);

:bsontype:`MinKey` always compares as lower than every other possible value,
while :bsontype:`MaxKey` always compares as higher than every other possible
value. Using these special values for the lower and upper bounds of the range
captures the entire possible value space of ``a``.

.. _pre-define-zone-range-example:

Pre-Define Zones and Zone Ranges for an Empty or Non-Existing Collection
Expand Down