# Maximum number of 'type' for one index of Elasticsearch

**URL:** https://discuss.elastic.co/t/maximum-number-of-type-for-one-index-of-elasticsearch/35518
**Category:** Elasticsearch
**Created:** [November 25, 2015, 7:24am UTC](https://discuss.elastic.co/t/maximum-number-of-type-for-one-index-of-elasticsearch/35518 "2015-11-25T07:24:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Jason\_Zheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jason_zheng/32/4041_2.png) [@Jason\_Zheng](https://discuss.elastic.co/u/Jason_Zheng)
#### Post date: [November 25, 2015, 7:24am UTC](https://discuss.elastic.co/t/maximum-number-of-type-for-one-index-of-elasticsearch/35518/1 "2015-11-25T07:24:32Z")

</div>

Hi All,

similar question like [Elasticsearch max number of documents for one index](https://discuss.elastic.co/t/elasticsearch-max-number-of-documents-for-one-index/26578), maximum number of 'type' for one index of Elasticsearch?

Jason

---

<div class="post-metadata">

### Author: ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)
#### Post date: [November 25, 2015, 8:54am UTC](https://discuss.elastic.co/t/maximum-number-of-type-for-one-index-of-elasticsearch/35518/2 "2015-11-25T08:54:42Z")

</div>

Hi,

types in Elasticsearch are a convenient way of grouping similar documents. Internally documents are stored in Lucene as simple key-value pairs, so if you store a document under a certain type in Elasticsearch, that type name is internally stored in a "\_type" field. Queries hitting that type are effectively filters on the whole document collection in the index. That said, there's no real limit on the numbers of types, but its probably good advice to keep the number of types small, since each type can potentially have its own mapping. Also there are potential problems when using same field names for different types, so make sure to read [https://www.elastic.co/guide/en/elasticsearch/guide/current/mapping.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/mapping.html) before using too many types in one index.

---

<div class="post-metadata">

### Author: ![Jason\_Zheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jason_zheng/32/4041_2.png) [@Jason\_Zheng](https://discuss.elastic.co/u/Jason_Zheng)
#### Post date: [November 26, 2015, 2:41am UTC](https://discuss.elastic.co/t/maximum-number-of-type-for-one-index-of-elasticsearch/35518/3 "2015-11-26T02:41:40Z")

</div>

Hi Chirstoph,

Its helpful, thanks

Jason

---

<div class="post-metadata">

### Author: ![Jason\_Zheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jason_zheng/32/4041_2.png) [@Jason\_Zheng](https://discuss.elastic.co/u/Jason_Zheng)
#### Post date: [November 26, 2015, 3:23am UTC](https://discuss.elastic.co/t/maximum-number-of-type-for-one-index-of-elasticsearch/35518/4 "2015-11-26T03:23:17Z")

</div>

Hi Christoph,

Simply to say, same filed name and different type (string or date...) of different type for one index will make some problem, like incorrect result of queries

Jason

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 5, 2017, 11:35pm UTC](https://discuss.elastic.co/t/maximum-number-of-type-for-one-index-of-elasticsearch/35518/5 "2017-07-05T23:35:45Z")

</div>


