-
Type: Task
-
Resolution: Fixed
-
Priority: Critical - P2
-
Affects Version/s: None
-
Labels:
Our documentation for Sparse Indexes contains the following:
sparse Index and Incomplete Results
If a sparse index would result in an incomplete result set for queries and sort operations, MongoDB will not use that index unless a hint() explicitly specifies the index.
Geospatial and text indexes are sparse by definition and are documented as such (eg: here). While it can be concluded from that documentation that there are associated eligibility considerations, it is not nearly as clear as what is described in the Sparse Index documentation above.
This can be problematic since these indexes can also be compound. In multiple places in the documentation we highlight the benefits of constructing indexes in such a way that their prefix ordering supports multiple query shapes (eg here and here. The sparse nature of these indexes adds additional constraints when designing them. The documentation should more clearly highlight these considerations.
- is related to
-
SERVER-37059 Prefix of compound text indexes cannot be used for non-text search queries
- Closed