- Reference >
- Enumeration Classes >
- MongoDB\Model\IndexInfo::getName()
MongoDB\Model\IndexInfo::getName()
On this page
Definition
-
MongoDB\Model\IndexInfo::getName Return the index name. This correlates with the return value of
MongoDB\Collection::createIndex(). An index name may be derived from the$keyparameter or or explicitly specified via thenameoption.
Return Values
The index name.
Examples
The output would then resemble:
x_1
See Also
MongoDB\Collection::createIndex()- listIndexes command reference in the MongoDB manual