# Document Type in version 6.1.0

**URL:** <https://discuss.elastic.co/t/document-type-in-version-6-1-0/113933>\
**Category:** Logstash\
**Created:** [January 3, 2018, 2:10pm UTC](https://discuss.elastic.co/t/document-type-in-version-6-1-0/113933 "2018-01-03T14:10:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_Matera](https://avatars.discourse-cdn.com/v4/letter/f/ba9def/32.png) [@Frank\_Matera](https://discuss.elastic.co/u/Frank_Matera)\
**Post date:** [January 3, 2018, 2:10pm UTC](https://discuss.elastic.co/t/document-type-in-version-6-1-0/113933/1 "2018-01-03T14:10:02Z")

</div>

I have been testing ELK for a few months and was previously on 5.6. Filebeat -\> Logstash -\> Elasticsearch. In 5.6 Filebeat I would assign a document\_type to a log. I was working with 2 types of logs:

filebeat.prospectors:

- input\_type: log  
paths:
  - /splunkcdrs/elastics/elastics/sbc/\*.spl  
document\_type: sbc

- input\_type: log  
paths:
  - /splunkcdrs/elastics/elastics/coins/\*.spl  
document\_type: coins

In logstash, I would apply mapping(filter) based off of document type:  
if [document\_type] == "sbc" apply one mapping

if [document\_type] == "coins" apply a different mapping

This worked great. I see in 6.1.0 they have eliminated document\_type.

No matter what I try, I can no longer get the mappings applied.

I tried changing document\_type to type in Filebeat. And the same in the Logstash configs with no luck.

I see in Kibana there is a prospector.type. I tried to update the Logstash configs with prospector.type but did not work as well.

Any assistance on how I should proceed would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 6, 2018, 10:21am UTC](https://discuss.elastic.co/t/document-type-in-version-6-1-0/113933/2 "2018-01-06T10:21:05Z")

</div>

Use

```nohighlight
fields:
  document_type: sbc
fields_under_root: true

```

in the Filebeat configuration to get a `document_type` field in each event.

---

<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:** [February 3, 2018, 10:21am UTC](https://discuss.elastic.co/t/document-type-in-version-6-1-0/113933/3 "2018-02-03T10:21:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
