# Can't make data searchable when I include time

**URL:** https://discuss.elastic.co/t/cant-make-data-searchable-when-i-include-time/184999
**Category:** Kibana
**Created:** [June 10, 2019, 1:35pm UTC](https://discuss.elastic.co/t/cant-make-data-searchable-when-i-include-time/184999 "2019-06-10T13:35:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Hiven](https://avatars.discourse-cdn.com/v4/letter/h/ac91a4/32.png) [@Hiven](https://discuss.elastic.co/u/Hiven)
#### Post date: [June 10, 2019, 1:35pm UTC](https://discuss.elastic.co/t/cant-make-data-searchable-when-i-include-time/184999/1 "2019-06-10T13:35:39Z")

</div>

I'm really stuggling. My elasticsearch data and mapping is in this format:

**Data**

```
{
  "test" : [ {
    "data" : "119050300",
    "date" : "10:00 2019-06-03"
  } ]
}

```

**Mapping**

```
{
  "mappings": {
    "properties": {
      "date": {
        "type": "date",
        "format": "HH:mm yyyy-MM-dd"
      },
        "data": {
        "type": "integer"
      }
    }
  }
}

```

In Kibana I couldn't find this data, as the date didn't seem to appear even when I used the correct range. However, if I remove the time aspect and do this instead, it works fine:

**Data**

```
{
  "test" : [ {
    "data" : "119050300",
    "date" : "2019-06-03"
  } ]
}

```

**Map**

```
{
  "mappings": {
    "properties": {
      "date": {
        "type": "date",
        "format": "yyyy-MM-dd"
      },
        "data": {
        "type": "integer"
      }
    }
  }
}

```

Can someone please tell me how to include the time and not have it break.

---

<div class="post-metadata">

### Author: ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)
#### Post date: [June 27, 2019, 2:33pm UTC](https://discuss.elastic.co/t/cant-make-data-searchable-when-i-include-time/184999/2 "2019-06-27T14:33:13Z")

</div>

Hi @Hiven it's a weird behaviour but before opening any issue I'd like to ask you few questions:

- what is your Kibana version?
- what do you mean by `In Kibana I couldn't find this data`? where are you looking for that data? Does it appear as part of the doc in the discover?

I've tried to replicate that issue but I don't see any error on that mapping. I'm using the following from the dev tools:

```auto
PUT test_index
{
  "mappings": {
    "properties": {
      "date": {
        "type": "date",
        "format": "HH:mm yyyy-MM-dd"
      }
    }
  }
}
PUT test_index/_doc/1
{
  "date" : "10:00 2019-06-03"
}

PUT test_index/_doc/2
{
  "date" : "12:00 2019-06-03"
}

```

And those documents are easily visible from discovery

 ![22](https://us1.discourse-cdn.com/elastic/original/3X/d/d/ddf7b65534b5f844590045f6e56a3bd56ee9e826.png)

One last question: have you created an index-pattern on that index? it's required to be created for most of the application/visualization. Also remember to add that field as `Time Filter field` when creating the index pattern.

---

<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: [July 25, 2019, 2:33pm UTC](https://discuss.elastic.co/t/cant-make-data-searchable-when-i-include-time/184999/3 "2019-07-25T14:33:16Z")

</div>

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