# Difference between type and \_type fields

**URL:** <https://discuss.elastic.co/t/difference-between-type-and--type-fields/47073>\
**Category:** Elasticsearch\
**Created:** [April 12, 2016, 6:40am UTC](https://discuss.elastic.co/t/difference-between-type-and--type-fields/47073 "2016-04-12T06:40:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunilmchaudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunilmchaudhari/32/9475_2.png) [@sunilmchaudhari](https://discuss.elastic.co/u/sunilmchaudhari)\
**Post date:** [April 12, 2016, 6:40am UTC](https://discuss.elastic.co/t/difference-between-type-and--type-fields/47073/1 "2016-04-12T06:40:56Z")

</div>

Hi,  
I can see 2 fields type and \_type.  
type, I created from LSF configuration and \_type is something I can see fomr kibana json object.  
Even if their value is same, what is difference between the two?

br,  
Sunil

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 12, 2016, 6:49am UTC](https://discuss.elastic.co/t/difference-between-type-and--type-fields/47073/2 "2016-04-12T06:49:38Z")

</div>

`_type` is something that ES uses for mappings.

---

<div class="post-metadata">

**Author:** ![sunilmchaudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunilmchaudhari/32/9475_2.png) [@sunilmchaudhari](https://discuss.elastic.co/u/sunilmchaudhari)\
**Post date:** [April 12, 2016, 6:52am UTC](https://discuss.elastic.co/t/difference-between-type-and--type-fields/47073/3 "2016-04-12T06:52:43Z")

</div>

Hi,  
OK.  
But why does it creates \_type when I have instructed in LSF/LS configuration to create type field already?  
Why cant it use type for mapping?  
Any diagram to illustrate construct of document, index, type will be helpful.

br,  
Sunil

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 12, 2016, 6:54am UTC](https://discuss.elastic.co/t/difference-between-type-and--type-fields/47073/4 "2016-04-12T06:54:18Z")

</div>

ES always creates this, it is a metadata field it requires.  
If you only want one then you should set the `_type` field and then remove the other `type` field.

[https://www.elastic.co/guide/en/elasticsearch/reference/2.3/mapping-type-field.html](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/mapping-type-field.html)

---

<div class="post-metadata">

**Author:** ![sunilmchaudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunilmchaudhari/32/9475_2.png) [@sunilmchaudhari](https://discuss.elastic.co/u/sunilmchaudhari)\
**Post date:** [April 12, 2016, 6:55am UTC](https://discuss.elastic.co/t/difference-between-type-and--type-fields/47073/5 "2016-04-12T06:55:31Z")

</div>

Thank you very much 🙂

---

<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:00pm UTC](https://discuss.elastic.co/t/difference-between-type-and--type-fields/47073/6 "2017-07-05T23:00:23Z")

</div>


