# Set custom type in logstash 6.0.0

**URL:** <https://discuss.elastic.co/t/set-custom-type-in-logstash-6-0-0/119808>\
**Category:** Logstash\
**Created:** [February 14, 2018, 1:52pm UTC](https://discuss.elastic.co/t/set-custom-type-in-logstash-6-0-0/119808 "2018-02-14T13:52:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhishek\_Wahi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhishek_wahi/32/66559_2.png) [@Abhishek\_Wahi](https://discuss.elastic.co/u/Abhishek_Wahi)\
**Post date:** [February 14, 2018, 1:52pm UTC](https://discuss.elastic.co/t/set-custom-type-in-logstash-6-0-0/119808/1 "2018-02-14T13:52:43Z")

</div>

Hi All,

I have a index in es 6.0.0 with type name as 'realtime'. I am loading some data from mysql in es using logstash. But it is giving me some deprecated warning for type.  
If i remove my entry for document type in output plugin of logstash, it is taking the by default value of doc which is giving some error.  
How can i set my custom type so that it won't give any warning?

---

<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:** [February 15, 2018, 8:48am UTC](https://discuss.elastic.co/t/set-custom-type-in-logstash-6-0-0/119808/2 "2018-02-15T08:48:56Z")

</div>

> I have a index in es 6.0.0 with type name as 'realtime'. I am loading some data from mysql in es using logstash. But it is giving me some deprecated warning for type.

Always quote message in full. Do not paraphrase.

> If i remove my entry for document type in output plugin of logstash, it is taking the by default value of doc which is giving some error.

Keep your elasticsearch output's `document_type => "realtime"` setting.

---

<div class="post-metadata">

**Author:** ![Abhishek\_Wahi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhishek_wahi/32/66559_2.png) [@Abhishek\_Wahi](https://discuss.elastic.co/u/Abhishek_Wahi)\
**Post date:** [February 15, 2018, 8:53am UTC](https://discuss.elastic.co/t/set-custom-type-in-logstash-6-0-0/119808/3 "2018-02-15T08:53:26Z")

</div>

Hi,  
Thanks for replying. In that case , it is giving me the deprecated warning for using `document_type`

---

<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:** [March 15, 2018, 8:53am UTC](https://discuss.elastic.co/t/set-custom-type-in-logstash-6-0-0/119808/4 "2018-03-15T08:53:49Z")

</div>

Closed on March 15, 2018, 8:53am UTC

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