@@ -64,10 +64,10 @@ Definition
6464
6565 If an index specified to
6666 :method:`db.collection.dropIndex()` is still building,
67- :method:`~ db.collection.dropIndex()` attempts to abort the
68- in-progress build. Aborting an index build has the same
67+ :method:`db.collection.dropIndex()` attempts to stop the
68+ in-progress build. Stopping an index build has the same
6969 effect as dropping the built index. Prior to MongoDB 4.4,
70- :method:`~ db.collection.dropIndex()` returned an error if
70+ :method:`db.collection.dropIndex()` returned an error if
7171 the specified index was still building. See
7272 :ref:`dropIndex-method-index-builds` for more complete
7373 documentation.
@@ -79,7 +79,9 @@ Definition
7979Behavior
8080--------
8181
82- .. include:: /includes/extracts/fact-method-dropIndex-query-behavior.rst
82+ .. |drop-index| replace:: :method:`db.collection.dropIndex()`
83+
84+ .. include:: /includes/fact-drop-index-5.2.rst
8385
8486Resource Locking
8587~~~~~~~~~~~~~~~~
@@ -90,43 +92,12 @@ Resource Locking
9092
9193.. _dropIndex-method-index-builds:
9294
93- Aborts In-Progress Index Builds
94- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
95-
96- .. versionadded:: 4.4
97-
98- If an index specified to :method:`db.collection.dropIndex()` is still
99- being built, :method:`~db.collection.dropIndex()` attempts to abort
100- the build. Aborting an index build has the same effect as dropping
101- the built index. Prior to MongoDB 4.4,
102- :method:`~db.collection.dropIndex()` returned an error if the
103- specified index was still building.
104-
105- The index specified to :method:`~db.collection.dropIndex()` must be the
106- only index associated to the index builder, i.e. the indexes built by a
107- single :dbcommand:`createIndexes` or
108- :method:`db.collection.createIndexes()` operation. If the associated
109- index builder has other in-progress builds, wait until the builds
110- complete and specify the index to :method:`~db.collection.dropIndex()`.
111-
112- For example, a :dbcommand:`createIndexes` /
113- :method:`~db.collection.createIndexes()` operation creates three
114- indexes. Assuming all three index builds are still in-progress,
115- :method:`~db.collection.dropIndex()` cannot successfully abort any of
116- the index builds and therefore cannot drop any of those indexes.
117-
118- Use :dbcommand:`currentOp` to identify the index builds associated to a
119- :dbcommand:`createIndexes` / :method:`~db.collection.createIndexes()`
120- operation. See :ref:`currentOp-cmd-index-creation` for an example.
121-
122- For replica sets or shard replica sets, aborting an index on the primary
123- does not simultaneously abort secondary index builds.
124- :method:`~db.collection.dropIndex()` attempts to abort the in-progress
125- builds for the specified indexes on the :term:`primary` and if
126- successful creates an associated "abort" oplog entry. :term:`Secondary
127- <secondary>` members with replicated in-progress builds wait for a
128- commit or abort oplog entry from the primary before either committing or
129- aborting the index build.
95+ Stop In-Progress Index Builds
96+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97+
98+ .. |drop-index| replace:: :method:`db.collection.dropIndex()`
99+
100+ .. include:: /includes/fact-stop-in-progress-index-builds.rst
130101
131102Hidden Indexes
132103~~~~~~~~~~~~~~
@@ -151,7 +122,7 @@ Example
151122-------
152123
153124Consider a ``pets`` collection. Calling the
154- :method:`~ db.collection.getIndexes()` method on the ``pets`` collection
125+ :method:`db.collection.getIndexes()` method on the ``pets`` collection
155126returns the following indexes:
156127
157128.. code-block:: javascript
0 commit comments