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 @@ -98,16 +98,15 @@ index would return an incomplete result set.
98
98
99
99
db.restaurants.find( { cuisine: "Italian" } )
100
100
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:
103
106
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.
107
108
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.
111
110
112
111
Sparse indexes select documents to index *solely* based on the
113
112
existence of the indexed field, or for compound indexes, the existence
@@ -286,4 +285,3 @@ greater than or equal to 21.
286
285
{ username: "amanda" },
287
286
{ username: "rajiv", age: null }
288
287
] )
289
-
You can’t perform that action at this time.
0 commit comments