# Type of Document\_id in logstash

**URL:** <https://discuss.elastic.co/t/type-of-document-id-in-logstash/149549>\
**Category:** Logstash\
**Created:** [September 22, 2018, 1:49pm UTC](https://discuss.elastic.co/t/type-of-document-id-in-logstash/149549 "2018-09-22T13:49:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ritwik1994](https://avatars.discourse-cdn.com/v4/letter/r/e56c9b/32.png) [@ritwik1994](https://discuss.elastic.co/u/ritwik1994)\
**Post date:** [September 22, 2018, 1:49pm UTC](https://discuss.elastic.co/t/type-of-document-id-in-logstash/149549/1 "2018-09-22T13:49:30Z")

</div>

Hi ,

In my database I am storing primary key as Long so I want my document\_type to be of long type but it is String by default. Can we change the type of document\_type in logstash

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 22, 2018, 2:29pm UTC](https://discuss.elastic.co/t/type-of-document-id-in-logstash/149549/2 "2018-09-22T14:29:12Z")

</div>

You can not set the type of document ids or types in Elasticsearch.

---

<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:** [October 20, 2018, 2:29pm UTC](https://discuss.elastic.co/t/type-of-document-id-in-logstash/149549/3 "2018-10-20T14:29:19Z")

</div>

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