Skip to content

Commit dc57a9f

Browse files
(DOCSP-21787): Cleanup for partial indexes (#982)
* (DOCSP-21787): Cleanup for partial indexes * updates per review comments * clarification
1 parent 05be6be commit dc57a9f

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

source/core/index-partial.txt

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,15 @@ index would return an incomplete result set.
9696

9797
db.restaurants.find( { cuisine: "Italian" } )
9898

99-
Comparison with the ``sparse`` Index
100-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99+
Comparison with Sparse Indexes
100+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101+
102+
Partial indexes are be preferred over :ref:`sparse indexes
103+
<index-type-sparse>`. Partial indexes provide the following benefits:
101104

102-
.. tip::
103-
Partial indexes represent a superset of the functionality offered by
104-
sparse indexes and should be preferred over sparse indexes.
105+
- Greater control over which documents are indexed.
105106

106-
Partial indexes offer a more expressive mechanism than
107-
:doc:`/core/index-sparse` indexes to specify which documents are
108-
indexed.
107+
- A superset of the functionality offered by sparse indexes.
109108

110109
Sparse indexes select documents to index *solely* based on the
111110
existence of the indexed field, or for compound indexes, the existence
@@ -284,4 +283,3 @@ greater than or equal to 21.
284283
{ username: "amanda" },
285284
{ username: "rajiv", age: null }
286285
] )
287-

0 commit comments

Comments
 (0)