# ElasticSearch and doc type

**URL:** <https://discuss.elastic.co/t/elasticsearch-and-doc-type/4193>\
**Category:** Elasticsearch\
**Created:** [April 6, 2011, 4:33am UTC](https://discuss.elastic.co/t/elasticsearch-and-doc-type/4193 "2011-04-06T04:33:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pcdinh](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@pcdinh](https://discuss.elastic.co/u/pcdinh)\
**Post date:** [April 6, 2011, 4:33am UTC](https://discuss.elastic.co/t/elasticsearch-and-doc-type/4193/1 "2011-04-06T04:33:51Z")

</div>

I read ElasticSearch online guide but found no information on why  
index name and doc type both exist. I wonder if doc type is a way to  
separate different indexes but all of them share the same logical  
name.

I think that I am wrong because ElasticSearch's /data directory shows  
nothing about it. E.x:

/usr/local/es/data/elasticsearch/nodes/0/indices/myindex/0/

Just index name is used to name a directory

Anyone kindly explain it to me?

Thanks

Dinh

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [April 6, 2011, 10:13am UTC](https://discuss.elastic.co/t/elasticsearch-and-doc-type/4193/2 "2011-04-06T10:13:01Z")

</div>

Index names are different indices. Types are just syntactic sugar to add separation between types of documents. If you know Lucene, type is just a field on a doc.  
On Wednesday, April 6, 2011 at 7:33 AM, pcdinh wrote:

> I read Elasticsearch online guide but found no information on why  
> index name and doc type both exist. I wonder if doc type is a way to  
> separate different indexes but all of them share the same logical  
> name.
> 
> I think that I am wrong because Elasticsearch's /data directory shows  
> nothing about it. E.x:
> 
> /usr/local/es/data/elasticsearch/nodes/0/indices/myindex/0/
> 
> Just index name is used to name a directory
> 
> Anyone kindly explain it to me?
> 
> Thanks
> 
> Dinh

---

<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 6, 2017, 4:08am UTC](https://discuss.elastic.co/t/elasticsearch-and-doc-type/4193/3 "2017-07-06T04:08:50Z")

</div>


