On this page
Indexing Methods in
Builds an index on a collection.
Removes a specified index on a collection.
Removes all indexes on a collection.
Returns an array of documents that describe the existing indexes on a collection.
Rebuilds all existing indexes on a collection.
Reports on the query execution plan for a cursor.
Forces MongoDB to use a specific index for a query.
Specifies an exclusive upper index bound for a cursor. For use with
Specifies an inclusive lower index bound for a cursor. For use with
Indexing Database Commands¶
Builds one or more indexes for a collection.
Removes indexes from a collection.
Defragments a collection and rebuilds the indexes.
Rebuilds all indexes on a collection.
Internal command that scans for a collection's data and indexes for correctness.
Removed in MongoDB 5.0. Performs a geospatial query that uses MongoDB's haystack index functionality.
Internal command that validates index on shard key.
Changes the minimum number of data-bearing members (i.e commit quorum), including the primary, that must vote to commit an in-progress index build before the primary marks those indexes as ready.
Geospatial Query Selectors¶
Indexing Query Modifiers¶
Forces MongoDB to report on query execution plans. See
Forces MongoDB to use a specific index. See
Specifies an exclusive upper limit for the index to use in a query. See
Specifies an inclusive lower limit for the index to use in a query. See
Forces the cursor to only return fields included in the index.