# Document\_type deprecated?

**URL:** <https://discuss.elastic.co/t/document-type-deprecated/96441>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 9, 2017, 1:37pm UTC](https://discuss.elastic.co/t/document-type-deprecated/96441 "2017-08-09T13:37:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [August 9, 2017, 1:55pm UTC](https://discuss.elastic.co/t/document-type-deprecated/96441/2 "2017-08-09T13:55:42Z")

</div>

I think that you will need to declare `document_type` as a custom field under `fields`, this way the `type` field will take the place of the `_type` field, as stated on this [link](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/removal-of-types.html).

I use the `type` field to allow me filter to in logstash, to use it with Filebeat 5.5 I've just declared it as a custom field under `fields`, as the example bellow

```auto
filebeat:
 prospectors:
  - input_type: log
    paths:
     - C:\inetpub\logs\LogFiles\W3SVC1\*.log
    fields:
      document_type: my-type
    exclude_lines: ["^#"]
    exclude_files: [".zip"]
    fields_under_root: true
    ignore_older: 24h

```

---

_[View the full topic](https://discuss.elastic.co/t/document-type-deprecated/96441)._
