﻿---
title: index
description: The index option controls whether field values are indexed. It accepts true or false and defaults to true. Indexing a field creates data structures that...
url: https://www.elastic.co/elastic/docs-builder/docs/2665/reference/elasticsearch/mapping-reference/mapping-index
products:
  - Elasticsearch
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available
---

# index
The `index` option controls whether field values are indexed. It accepts `true` or `false` and defaults to `true`.
Indexing a field creates data structures that enable the field to be queried efficiently. [Numeric types](https://www.elastic.co/elastic/docs-builder/docs/2665/reference/elasticsearch/mapping-reference/number), [date types](https://www.elastic.co/elastic/docs-builder/docs/2665/reference/elasticsearch/mapping-reference/date), the [boolean type](https://www.elastic.co/elastic/docs-builder/docs/2665/reference/elasticsearch/mapping-reference/boolean), [ip type](https://www.elastic.co/elastic/docs-builder/docs/2665/reference/elasticsearch/mapping-reference/ip), [geo_point type](https://www.elastic.co/elastic/docs-builder/docs/2665/reference/elasticsearch/mapping-reference/geo-point) and the [keyword type](https://www.elastic.co/elastic/docs-builder/docs/2665/reference/elasticsearch/mapping-reference/keyword) can also be queried when they are not indexed but only have doc values enabled. Queries on these fields are slow as a full scan of the index has to be made. All other fields are not queryable.