- Reference >
- Enumeration Classes >
- MongoDB\Model\IndexInfo::isSparse()
MongoDB\Model\IndexInfo::isSparse()
On this page
Definition
-
MongoDB\Model\IndexInfo::isSparse
Return whether the index is a sparse index. This correlates with the
sparse
option forMongoDB\Collection::createIndex()
.
Return Values
A boolean indicating whether the index is a sparse index.
Examples
The output would then resemble:
See Also
MongoDB\Collection::createIndex()
- listIndexes command reference in the MongoDB manual
- Sparse Indexes in the MongoDB manual