# Elasticsearch output without 'type' field

**URL:** https://discuss.elastic.co/t/elasticsearch-output-without-type-field/66841
**Category:** Logstash
**Created:** [November 22, 2016, 11:03am UTC](https://discuss.elastic.co/t/elasticsearch-output-without-type-field/66841 "2016-11-22T11:03:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![pdesoyres](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pdesoyres/32/509_2.png) [@pdesoyres](https://discuss.elastic.co/u/pdesoyres)
#### Post date: [November 22, 2016, 11:03am UTC](https://discuss.elastic.co/t/elasticsearch-output-without-type-field/66841/1 "2016-11-22T11:03:02Z")

</div>

Hi,

I have the following configuration :

```
input {
    http {
        code => "json"
    }
}
output {
    elasticsearch {
        index => "doc"
    }
}

```

This creates documents in the `doc` index with the default `_type` 'logs'. Good, but now, I want to specify my own `_type`, so I modify my input like below :

```
input {
    http {
        code => "json"
        type => "myType"
    }
}

```

Now documents are index with the right `_type`.  
But the problem is that the indexed documents have a field named '`type`' in their `_source`.

Is there any way to tell the `elasticsearch` output to use a specific `_type` but without having a `type` field indexed ?

---

<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: [December 20, 2016, 11:03am UTC](https://discuss.elastic.co/t/elasticsearch-output-without-type-field/66841/2 "2016-12-20T11:03:06Z")

</div>

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