Skip to content

Commit 8acfe91

Browse files
(DOCSP-21787): Cleanup for partial indexes (#982)
* (DOCSP-21787): Cleanup for partial indexes * updates per review comments * clarification
1 parent 3fa00e9 commit 8acfe91

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
@@ -98,16 +98,15 @@ index would return an incomplete result set.
9898

9999
db.restaurants.find( { cuisine: "Italian" } )
100100

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

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

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

112111
Sparse indexes select documents to index *solely* based on the
113112
existence of the indexed field, or for compound indexes, the existence
@@ -286,4 +285,3 @@ greater than or equal to 21.
286285
{ username: "amanda" },
287286
{ username: "rajiv", age: null }
288287
] )
289-

0 commit comments

Comments
 (0)