# Date processor on ingest do not create a date type on elasticsearch

**URL:** https://discuss.elastic.co/t/date-processor-on-ingest-do-not-create-a-date-type-on-elasticsearch/194459
**Category:** Elasticsearch
**Created:** [August 8, 2019, 3:02pm UTC](https://discuss.elastic.co/t/date-processor-on-ingest-do-not-create-a-date-type-on-elasticsearch/194459 "2019-08-08T15:02:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![thuck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thuck/32/51967_2.png) [@thuck](https://discuss.elastic.co/u/thuck)
#### Post date: [August 8, 2019, 3:02pm UTC](https://discuss.elastic.co/t/date-processor-on-ingest-do-not-create-a-date-type-on-elasticsearch/194459/1 "2019-08-08T15:02:39Z")

</div>

When parsing a field on the ingest pipeline; I would expect that the field would be created as Date on elasticsearch, but what I see is that they are created as String.  
I tried two different ways of parsing, below the samples:

Trying to overwrite the same time:

> ```
> {
> "date": {
> "field": "request.time",
> "ẗarget_field": "request.time",
> "formats": ["ISO8601"],
> "ignore_failure": true,
> "timezone": "UTC"
> }
> }
> 
> ```

Creating a new field:

> ```
> {
> "date": {
> "field": "request.time",
> "ẗarget_field": "request_time",
> "formats": ["ISO8601"],
> "ignore_failure": true,
> "timezone": "UTC"
> }
> }
> 
> ```

Am I missing something? Convert processor do not have an option for date.  
The format of the date is a valid ISO8601:  
"time":"2019-07-29T20:23:33.222Z"

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [August 9, 2019, 5:34am UTC](https://discuss.elastic.co/t/date-processor-on-ingest-do-not-create-a-date-type-on-elasticsearch/194459/2 "2019-08-09T05:34:01Z")

</div>

such an ISO field should be automatically mapped as a date. Can you provide a fully reproducible example as well as the elasticsearch version you are using?

Thanks!

---

<div class="post-metadata">

### Author: ![thuck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thuck/32/51967_2.png) [@thuck](https://discuss.elastic.co/u/thuck)
#### Post date: [August 9, 2019, 12:45pm UTC](https://discuss.elastic.co/t/date-processor-on-ingest-do-not-create-a-date-type-on-elasticsearch/194459/3 "2019-08-09T12:45:42Z")

</div>

@spinscale the log comes from filebeat parsing a log from a container (running on docker); as far as I understand the

> "date\_detection": false

([Disable date detection in index templates by andrewkroh · Pull Request #3528 · elastic/beats · GitHub](https://github.com/elastic/beats/pull/3528)) is the default settings and I believe this is why it was not detected as a date automatically; so I tried to include the date processor to force the type to be a date.  
I know that the processor works because on my second example the new field request\_time is created just fine, but with the type string instead of date.  
For the versions I'm using:  
elasticsearch-7.1.1-1.x86\_64  
filebeat-7.1.1-1.x86\_64

---

<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: [September 6, 2019, 12:57pm UTC](https://discuss.elastic.co/t/date-processor-on-ingest-do-not-create-a-date-type-on-elasticsearch/194459/4 "2019-09-06T12:57:21Z")

</div>

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