File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -96,16 +96,15 @@ index would return an incomplete result set.
96
96
97
97
db.restaurants.find( { cuisine: "Italian" } )
98
98
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:
101
104
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.
105
106
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.
109
108
110
109
Sparse indexes select documents to index *solely* based on the
111
110
existence of the indexed field, or for compound indexes, the existence
@@ -284,4 +283,3 @@ greater than or equal to 21.
284
283
{ username: "amanda" },
285
284
{ username: "rajiv", age: null }
286
285
] )
287
-
You can’t perform that action at this time.
0 commit comments