# Index in MongoDB

*noun*

say it: **“IN-deks in MONG-goh-DEE-BEE”** **/ˈɪndɛks ɪn ˈmɑŋɡoʊˌdiˌbi/**

A structure MongoDB keeps on a field so queries on it find documents without reading every one.

## What is **Index in MongoDB**?

An **index** makes queries on a field fast instead of scanning every document. `_id` is indexed automatically.

```javascript
db.recipes.createIndex({ category: 1 })
```

## In a sentence

- “After an **index** on farm.town, the search read 3 documents instead of 3,000.”
- “MongoDB makes an **index** on \_id for every collection.”

Level: Journeyman · [More MongoDB terms at this level](https://www.ask-codey.com/glossary?category=mongodb&level=3)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/index-in-mongodb
