# Kibana index pattern don't show data with time filter field name

**URL:** <https://discuss.elastic.co/t/kibana-index-pattern-dont-show-data-with-time-filter-field-name/256741>\
**Category:** Elasticsearch\
**Created:** [November 26, 2020, 8:50am UTC](https://discuss.elastic.co/t/kibana-index-pattern-dont-show-data-with-time-filter-field-name/256741 "2020-11-26T08:50:15Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![gyana\_nayak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gyana_nayak/32/56498_2.png) [@gyana\_nayak](https://discuss.elastic.co/u/gyana_nayak)\
**Post date:** [November 26, 2020, 8:50am UTC](https://discuss.elastic.co/t/kibana-index-pattern-dont-show-data-with-time-filter-field-name/256741/1 "2020-11-26T08:50:15Z")

</div>

i am trying to create an index from Java code to index some data but if i am creating index pattern with time filter Kibana never shows any data. Following below order while creating index with some setting and adding an index template for date filed

```auto
CreateIndexRequest request = new CreateIndexRequest(indexName);
        request.settings(Settings.builder()
                .put("index.max_inner_result_window", 250)
                .put("index.write.wait_for_active_shards", 1)
                .put("index.query.default_field", "paragraph")
                .put("index.number_of_shards", 3)
                .put("index.number_of_replicas", 2)
                .loadFromSource(Strings.toString(
                        XContentFactory.jsonBuilder()
                        .startObject()
                        .startObject("analysis")
                        .startObject("analyzer")
                        .startObject("englishAnalyzer")
                        .field("tokenizer", "standard")
                        .field("char_filter", "html_strip")
                        .field("filter", new String[] { "snowball", "standard", "lowercase" })
                        .endObject()
                        .startObject("email")
                        .field("filter", new String[] { "standard", "lowercase" })
                        .field("type", "custom")
                        .field("tokenizer", "uax_url_email")
                        .endObject()
                        .endObject()
                        .endObject()
                        .endObject()), XContentType.JSON));
        CreateIndexResponse createIndexResponse = client.indices().create(request, RequestOptions.DEFAULT);
        

```

```auto
PutIndexTemplateRequest request = new PutIndexTemplateRequest(templateName);
            request.patterns(templateList);
            request.settings(Settings.builder().put("index.number_of_shards", 3).put("index.number_of_replicas", 1));
            XContentBuilder builder = XContentFactory.jsonBuilder();
            builder.startObject();
            {
                builder.startObject("properties");
                {
                    builder.startObject("createdDate");
                    {
                        builder.field("type", "date").field("format", "yyyy-MM-dd HH:mm:ss.SSS");
                    }
                    builder.endObject();
                }
                builder.endObject();
            }
            builder.endObject();
            request.mapping(builder);
            request.version();
            client.indices().putTemplate(request, RequestOptions.DEFAULT);

```

Then i am inserting below record as JSON but when creating an index pattern with time filter keep on showing empty result in Kibana discovery

```auto
{
  "createdDate": "2020-11-25 13:33:36.782",
  "userId": "raw.man@bee.com",
}

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 26, 2020, 1:37pm UTC](https://discuss.elastic.co/t/kibana-index-pattern-dont-show-data-with-time-filter-field-name/256741/2 "2020-11-26T13:37:24Z")

</div>

Hi.

Few things to check.

What is the index mapping?

Run this from Kibana dev console:

```auto
GET /YOURINDEX/_mapping

```

Then, if it's correct, check that you selected the `createdDate` as the time field when you created the index pattern in Kibana.

---

<div class="post-metadata">

**Author:** ![gyana\_nayak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gyana_nayak/32/56498_2.png) [@gyana\_nayak](https://discuss.elastic.co/u/gyana_nayak)\
**Post date:** [November 27, 2020, 6:26am UTC](https://discuss.elastic.co/t/kibana-index-pattern-dont-show-data-with-time-filter-field-name/256741/3 "2020-11-27T06:26:39Z")

</div>

please find index mapping

```auto
{
  "httplog" : {
    "mappings" : {
      "properties" : {
        "createdDate" : {
          "type" : "date",
          "format" : "yyyy-MM-dd HH:mm:ss.SSS"
        },
        "userId" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        }
      }
    }
  }
}

```

Below is the JSON i am pushing

```auto
{
createdDate=2020-11-27 11:55:02.930, 
userId=abcd@bee.com
}

```

using ELK 7.4 version

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 27, 2020, 7:21am UTC](https://discuss.elastic.co/t/kibana-index-pattern-dont-show-data-with-time-filter-field-name/256741/4 "2020-11-27T07:21:23Z")

</div>

Did you check the last part of my answer?

---

<div class="post-metadata">

**Author:** ![gyana\_nayak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gyana_nayak/32/56498_2.png) [@gyana\_nayak](https://discuss.elastic.co/u/gyana_nayak)\
**Post date:** [November 27, 2020, 7:27am UTC](https://discuss.elastic.co/t/kibana-index-pattern-dont-show-data-with-time-filter-field-name/256741/5 "2020-11-27T07:27:47Z")

</div>

could you tell me how would i check `check that you selected the createdDate as the time field when you created the index pattern in Kibana`

while creating index pattern i am getting below things

 ![Screen Shot 2020-11-27 at 12.53.29 PM](https://us1.discourse-cdn.com/elastic/original/3X/c/1/c1a52470aa73efb958b19ffdb80a52cba7e39e9f.jpeg)

if i select `createdDate` then Kibana not showing any data.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 27, 2020, 8:27am UTC](https://discuss.elastic.co/t/kibana-index-pattern-dont-show-data-with-time-filter-field-name/256741/6 "2020-11-27T08:27:43Z")

</div>

Could you change the time period in Kibana?

Instead of last 15 minutes, use last 2 weeks.  
If nothing shows up, share the output of:

```
GET httplog/_search
```

---

<div class="post-metadata">

**Author:** ![gyana\_nayak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gyana_nayak/32/56498_2.png) [@gyana\_nayak](https://discuss.elastic.co/u/gyana_nayak)\
**Post date:** [November 27, 2020, 9:29am UTC](https://discuss.elastic.co/t/kibana-index-pattern-dont-show-data-with-time-filter-field-name/256741/7 "2020-11-27T09:29:33Z")

</div>

Nothing is Showing

 ![Screen Shot 2020-11-27 at 2.57.25 PM](https://us1.discourse-cdn.com/elastic/original/3X/3/5/35e8fbe5046c6f329aaced566ad6b5406fc79069.png)

After firing `GET httplog/_search` below record is showing

```auto
{
  "took" : 1,
  "timed_out" : false,
  "_shards" : {
    "total" : 3,
    "successful" : 3,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 1,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "httplog",
        "_type" : "_doc",
        "_id" : "Rh2-CHYBRk3R1lxIdodk",
        "_score" : 1.0,
        "_source" : {
          "createdDate" : "2020-11-27 13:37:48.575",
          "userId" : "abcd@bee.com"
        }
      }
    ]
  }
}

```

Additional information i am using Joda date to set createdDate value

```auto
Map<String, Object> searchableMap = jsonObject.toMap();
			DateTime dt = new DateTime();
			DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss.SSS");
			String str = fmt.print(dt);
			searchableMap.put("createdDate", str);
			request.source(searchableMap, XContentType.JSON);
			IndexResponse response = client.index(request, RequestOptions.DEFAULT); 

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 27, 2020, 10:00am UTC](https://discuss.elastic.co/t/kibana-index-pattern-dont-show-data-with-time-filter-field-name/256741/8 "2020-11-27T10:00:35Z")

</div>

I suspect that you have to look into the future to see your content.

There's a timezone problem here. Elasticsearch is using UTC when the timezone is not specified.

Kibana is using the browser timezone.

Try to change the date in Kibana and look at data from yesterday to next week for example and you should see your hit.

---

<div class="post-metadata">

**Author:** ![gyana\_nayak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gyana_nayak/32/56498_2.png) [@gyana\_nayak](https://discuss.elastic.co/u/gyana_nayak)\
**Post date:** [November 27, 2020, 10:31am UTC](https://discuss.elastic.co/t/kibana-index-pattern-dont-show-data-with-time-filter-field-name/256741/9 "2020-11-27T10:31:28Z")

</div>

if it would be the case then when i am selecting last 2 weeks as filter it should show.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 27, 2020, 2:08pm UTC](https://discuss.elastic.co/t/kibana-index-pattern-dont-show-data-with-time-filter-field-name/256741/10 "2020-11-27T14:08:13Z")

</div>

That's my only guess. Did you try ?

Could you try to create the index pattern without any date filter as well?

---

<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 25, 2020, 2:08pm UTC](https://discuss.elastic.co/t/kibana-index-pattern-dont-show-data-with-time-filter-field-name/256741/11 "2020-12-25T14:08:18Z")

</div>

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