# "No results match your search criteria" error while there is data

**URL:** <https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753>\
**Category:** Kibana\
**Created:** [August 19, 2019, 1:40pm UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753 "2019-08-19T13:40:43Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![electrical1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/electrical1/32/52547_2.png) [@electrical1](https://discuss.elastic.co/u/electrical1)\
**Post date:** [August 19, 2019, 1:40pm UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/1 "2019-08-19T13:40:44Z")

</div>

Hi,

Not sure if its completely a Kibana issue but for some reason its not showing any data using the "discover" part.  
In the "index patterns" the index has been setup with a specific date field to be used for any time filters.  
Data is being indexed fine and when I do a manual search the data shows up fine.  
The indexes are time based so setup the pattern with a \* at the end.

Is there a way I can debug this further? I'm bit at a loss.

Running ES + Kibana 7.3.0

---

<div class="post-metadata">

**Author:** ![alisongoryachev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alisongoryachev/32/111352_2.png) [@alisongoryachev](https://discuss.elastic.co/u/alisongoryachev)\
**Post date:** [August 19, 2019, 3:55pm UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/2 "2019-08-19T15:55:30Z")

</div>

Hi @electrical1!

Welcome to the discussion boards.

Can you [provide the mappings](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html#indices-get-mapping) for your index? Thanks!

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [August 19, 2019, 3:56pm UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/3 "2019-08-19T15:56:23Z")

</div>

Hey @electrical1,

The best way to debug this further is to use the "Inspect" feature. From the Discover app, click the "Inspect" link after attempting a search which returns 0 results.

From there, a flyout will appear on the righthand side of the screen. Click the "Request" tab there to see the request that Kibana issued to Elasticsearch:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/7/97fbf2ce728ce68be2128b52a4f52e2d3dae2495.png)

You can also view the response too, but I'm guessing there won't be anything useful there.

---

<div class="post-metadata">

**Author:** ![electrical1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/electrical1/32/52547_2.png) [@electrical1](https://discuss.elastic.co/u/electrical1)\
**Post date:** [August 19, 2019, 3:57pm UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/4 "2019-08-19T15:57:17Z")

</div>

Hi @alisongoryachev

Here is the mapping:

```
{
  "mapping": {
    "properties": {
      "bandwidthPlan": {
        "type": "keyword"
      },
      "bandwidthPlanId": {
        "type": "short"
      },
      "bandwidthPlanPartnerId": {
        "type": "short"
      },
      "beamId": {
        "type": "short"
      },
      "beamName": {
        "type": "keyword"
      },
      "beamPool": {
        "type": "keyword"
      },
      "beamPoolId": {
        "type": "short"
      },
      "beamPool_downloadRate": {
        "type": "integer"
      },
      "beamPool_uploadRate": {
        "type": "integer"
      },
      "borrowing": {
        "type": "keyword"
      },
      "carrierId": {
        "type": "short"
      },
      "creationTime": {
        "type": "date",
        "format": "YYYY-MM-DD'T'HH:mm:ss'Z'"
      },
      "diagnostics": {
        "type": "boolean"
      },
      "endpointPolicy": {
        "type": "keyword"
      },
      "globalPool": {
        "type": "keyword"
      },
      "globalPoolId": {
        "type": "short"
      },
      "globalPool_downloadRate": {
        "type": "integer"
      },
      "globalPool_uploadRate": {
        "type": "integer"
      },
      "hub": {
        "type": "keyword"
      },
      "hubId": {
        "type": "short"
      },
      "hubPool": {
        "type": "keyword"
      },
      "hubPoolId": {
        "type": "short"
      },
      "hubPool_downloadRate": {
        "type": "integer"
      },
      "hubPool_uploadRate": {
        "type": "integer"
      },
      "hub_downloadRate": {
        "type": "integer"
      },
      "hub_uploadRate": {
        "type": "integer"
      },
      "isNonBillable": {
        "type": "boolean"
      },
      "oid": {
        "type": "long"
      },
      "parentOid": {
        "type": "long"
      },
      "partnerId": {
        "type": "short"
      },
      "partnerType": {
        "type": "keyword"
      },
      "region": {
        "type": "keyword"
      },
      "satellite": {
        "type": "keyword"
      },
      "satelliteId": {
        "type": "short"
      },
      "sessionId": {
        "type": "keyword"
      },
      "slaId": {
        "type": "short"
      },
      "slaLegacyId": {
        "type": "short"
      },
      "slaLegacy_downloadRate": {
        "type": "integer"
      },
      "slaLegacy_fairFactor": {
        "type": "short"
      },
      "slaLegacy_uploadRate": {
        "type": "integer"
      },
      "sla_downloadRate": {
        "type": "integer"
      },
      "sla_uploadRate": {
        "type": "integer"
      },
      "state": {
        "type": "keyword"
      },
      "subPool": {
        "type": "keyword"
      },
      "subPoolId": {
        "type": "short"
      },
      "subPoolName": {
        "type": "keyword"
      },
      "subPool_downloadRate": {
        "type": "integer"
      },
      "subPool_uploadRate": {
        "type": "integer"
      },
      "subpoolClass": {
        "type": "keyword"
      },
      "subscriberId": {
        "type": "keyword"
      },
      "svnoInterconnect": {
        "type": "boolean"
      },
      "updateTime": {
        "type": "date",
        "format": "YYYY-MM-DD'T'HH:mm:ss.SSS'Z'"
      },
      "usagePolicyId": {
        "type": "short"
      },
      "vlan": {
        "type": "long"
      },
      "voip": {
        "type": "boolean"
      }
    }
  }
}
```

---

<div class="post-metadata">

**Author:** ![electrical1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/electrical1/32/52547_2.png) [@electrical1](https://discuss.elastic.co/u/electrical1)\
**Post date:** [August 19, 2019, 3:58pm UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/5 "2019-08-19T15:58:08Z")

</div>

@Larry_Gregory I've tried that yeah but didn't find anything obvious wrong with it.  
Happy to paste the content of the inspect request part if needed.

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [August 19, 2019, 4:00pm UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/6 "2019-08-19T16:00:13Z")

</div>

The only other thought I have is related to timezone. If you expand your search range in both directions (e.g., 2 days ago -\> 2 days from now), do you see any data? It's possible that Kibana is translating your query into a timezone that you aren't expecting it to use.

---

<div class="post-metadata">

**Author:** ![electrical1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/electrical1/32/52547_2.png) [@electrical1](https://discuss.elastic.co/u/electrical1)\
**Post date:** [August 19, 2019, 4:01pm UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/7 "2019-08-19T16:01:11Z")

</div>

I did yeah. I searched in the last 30 days and also in "this month". no luck.

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [August 19, 2019, 4:03pm UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/8 "2019-08-19T16:03:17Z")

</div>

> [@electrical1](#):
>
> Happy to paste the content of the inspect request part if needed.

It can't hurt, but I suspect it won't be terribly helpful without access to the underlying indices too, which you won't be able to provide 🙂

---

<div class="post-metadata">

**Author:** ![electrical1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/electrical1/32/52547_2.png) [@electrical1](https://discuss.elastic.co/u/electrical1)\
**Post date:** [August 27, 2019, 4:20pm UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/9 "2019-08-27T16:20:54Z")

</div>

@Larry_Gregory @alisongoryachev any idea's? Bit at a loss here.

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [August 27, 2019, 4:39pm UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/10 "2019-08-27T16:39:11Z")

</div>

Sorry, no new ideas -- are you still able to provide the contents of the inspect request part? We'll take a look at that and see if anything jumps out.

As a quick sanity check, can you run the query from that inspect section manually and see if it returns anything? I know you mentioned you can query the indices manually, but I'm interested to see how your manual query differs from the one that Kibana tries to run.

---

<div class="post-metadata">

**Author:** ![electrical1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/electrical1/32/52547_2.png) [@electrical1](https://discuss.elastic.co/u/electrical1)\
**Post date:** [August 27, 2019, 5:04pm UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/11 "2019-08-27T17:04:02Z")

</div>

Hi @Larry_Gregory

Here is the request part.  
The manual request is without any filtering or sorts which does give back all the data without any issues.

```
{
  "version": true,
  "size": 500,
  "sort": [
    {
      "updateTime": {
        "order": "desc",
        "unmapped_type": "boolean"
      }
    }
  ],
  "_source": {
    "excludes": []
  },
  "aggs": {
    "2": {
      "date_histogram": {
        "field": "updateTime",
        "fixed_interval": "12h",
        "time_zone": "Europe/London",
        "min_doc_count": 1
      }
    }
  },
  "stored_fields": [
    "*"
  ],
  "script_fields": {},
  "docvalue_fields": [
    {
      "field": "creationTime",
      "format": "date_time"
    },
    {
      "field": "updateTime",
      "format": "date_time"
    }
  ],
  "query": {
    "bool": {
      "must": [
        {
          "range": {
            "updateTime": {
              "format": "strict_date_optional_time",
              "gte": "2019-07-28T17:02:10.285Z",
              "lte": "2019-08-27T17:02:10.285Z"
            }
          }
        }
      ],
      "filter": [
        {
          "match_all": {}
        }
      ],
      "should": [],
      "must_not": []
    }
  },
  "highlight": {
    "pre_tags": [
      "@kibana-highlighted-field@"
    ],
    "post_tags": [
      "@/kibana-highlighted-field@"
    ],
    "fields": {
      "*": {}
    },
    "fragment_size": 2147483647
  }
}

```

Response:

```
{
  "took": 36,
  "timed_out": false,
  "_shards": {
    "total": 264,
    "successful": 264,
    "skipped": 263,
    "failed": 0
  },
  "hits": {
    "total": 0,
    "max_score": null,
    "hits": []
  },
  "aggregations": {
    "2": {
      "buckets": []
    }
  },
  "status": 200
}
```

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [August 27, 2019, 6:39pm UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/12 "2019-08-27T18:39:28Z")

</div>

Thanks for the response. Ok, I have a theory. Taking another look at the mapping you provided earlier, I noticed the following:

```auto
"creationTime": {
        "type": "date",
        "format": "YYYY-MM-DD'T'HH:mm:ss'Z'"
      },

```

When Kibana builds the query to Elasticsearch, it provides the following range query:

```auto
"query": {
    "bool": {
      "must": [
        {
          "range": {
            "updateTime": {
              "format": "strict_date_optional_time",
              "gte": "2019-07-28T17:02:10.285Z",
              "lte": "2019-08-27T17:02:10.285Z"
            }
          }
        }
      ]
    }
  },

```

Kibana is [hard-coded](https://github.com/elastic/kibana/blob/master/src/legacy/ui/public/agg_types/buckets/create_filter/date_range.js#L32) to expect a date field that conforms to the built-in [`strict_date_optional_time` format](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html#built-in-date-formats), which your field does not conform to.

If you change the format of that field to be something like `yyyy-MM-dd'T'HH:mm:ssZZ` (which is the built-in `strict_date_time_no_millis` format), does the discover app populate the way you'd expect it to?

---

<div class="post-metadata">

**Author:** ![electrical1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/electrical1/32/52547_2.png) [@electrical1](https://discuss.elastic.co/u/electrical1)\
**Post date:** [August 28, 2019, 8:11am UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/13 "2019-08-28T08:11:15Z")

</div>

Just to clarify, you need me to change the format of how we store the data?  
Any specific reason why kibana is hard coded like that? doesn't make it very flexible to use.

---

<div class="post-metadata">

**Author:** ![electrical1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/electrical1/32/52547_2.png) [@electrical1](https://discuss.elastic.co/u/electrical1)\
**Post date:** [August 29, 2019, 4:44pm UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/14 "2019-08-29T16:44:40Z")

</div>

Did some more testing today.

When i do a manual query using Postman using the `2019-08-27T17:02:10.285Z` format it doesn't work with `strict_date_optional_time` but does work if i use the format `YYYY-MM-dd'T'HH:mm:ss.SSS'Z'`

Next issue I found now is that the aggregation does something very weird.  
The month, day, hour and minute values are correct but all my year values are 1970.  
For example:

```
   "aggregations": {
        "usage": {
            "buckets": [
                {
                    "key_as_string": "1970-03-13T00:00:00.000Z",
                    "key": 6134400000,
                    "doc_count": 32
                },
                {
                    "key_as_string": "1970-03-21T00:00:00.000Z",
                    "key": 6825600000,
                    "doc_count": 2
                },
                {
                    "key_as_string": "1970-03-29T00:00:00.000Z",
                    "key": 7516800000,
                    "doc_count": 4
                },
                {
                    "key_as_string": "1970-04-10T00:00:00.000Z",
                    "key": 8553600000,
                    "doc_count": 2
                },
                {
                    "key_as_string": "1970-04-23T00:00:00.000Z",
                    "key": 9676800000,
                    "doc_count": 2
                },
                {
                    "key_as_string": "1970-04-25T00:00:00.000Z",
                    "key": 9849600000,
                    "doc_count": 2
                },
                {
                    "key_as_string": "1970-05-07T00:00:00.000Z",
                    "key": 10886400000,
                    "doc_count": 80
                },
                {
                    "key_as_string": "1970-05-09T00:00:00.000Z",
                    "key": 11059200000,
                    "doc_count": 2
                },
                {
                    "key_as_string": "1970-05-13T00:00:00.000Z",
                    "key": 11404800000,
                    "doc_count": 2
                },
                {
                    "key_as_string": "1970-05-14T00:00:00.000Z",
                    "key": 11491200000,
                    "doc_count": 4
                },
                {
                    "key_as_string": "1970-05-16T00:00:00.000Z",
                    "key": 11664000000,
                    "doc_count": 8
                },
                {
                    "key_as_string": "1970-05-17T00:00:00.000Z",
                    "key": 11750400000,
                    "doc_count": 4
                },
                {
                    "key_as_string": "1970-05-24T00:00:00.000Z",
                    "key": 12355200000,
                    "doc_count": 4
                },
                {
                    "key_as_string": "1970-05-28T00:00:00.000Z",
                    "key": 12700800000,
                    "doc_count": 2
                },
                {
                    "key_as_string": "1970-06-06T00:00:00.000Z",
                    "key": 13478400000,
                    "doc_count": 2
                },
                {
                    "key_as_string": "1970-06-07T00:00:00.000Z",
                    "key": 13564800000,
                    "doc_count": 2
                },
                {
                    "key_as_string": "1970-06-13T00:00:00.000Z",
                    "key": 14083200000,
                    "doc_count": 6
                },
                {
                    "key_as_string": "1970-06-14T00:00:00.000Z",
                    "key": 14169600000,
                    "doc_count": 2
                },
                {
                    "key_as_string": "1970-06-15T00:00:00.000Z",
                    "key": 14256000000,
                    "doc_count": 2
                },
                {
                    "key_as_string": "1970-06-17T00:00:00.000Z",
                    "key": 14428800000,
                    "doc_count": 8
                },
                {
                    "key_as_string": "1970-06-18T00:00:00.000Z",
                    "key": 14515200000,
                    "doc_count": 188
                },
                {
                    "key_as_string": "1970-06-19T00:00:00.000Z",
                    "key": 14601600000,
                    "doc_count": 14
                },
                {
                    "key_as_string": "1970-06-20T00:00:00.000Z",
                    "key": 14688000000,
                    "doc_count": 8
                },
                {
                    "key_as_string": "1970-06-21T00:00:00.000Z",
                    "key": 14774400000,
                    "doc_count": 4
                },
                {
                    "key_as_string": "1970-06-24T00:00:00.000Z",
                    "key": 15033600000,
                    "doc_count": 2
                },
                {
                    "key_as_string": "1970-06-27T00:00:00.000Z",
                    "key": 15292800000,
                    "doc_count": 2
                },
                {
                    "key_as_string": "1970-06-28T00:00:00.000Z",
                    "key": 15379200000,
                    "doc_count": 8
                },
                {
                    "key_as_string": "1970-06-30T00:00:00.000Z",
                    "key": 15552000000,
                    "doc_count": 2
                },
                {
                    "key_as_string": "1970-07-01T00:00:00.000Z",
                    "key": 15638400000,
                    "doc_count": 2
                },
                {
                    "key_as_string": "1970-07-08T00:00:00.000Z",
                    "key": 16243200000,
                    "doc_count": 6
                },
                {
                    "key_as_string": "1970-07-09T00:00:00.000Z",
                    "key": 16329600000,
                    "doc_count": 2
                }
            ]
        }
    }

```

Any idea what could be causing this?

---

<div class="post-metadata">

**Author:** ![electrical1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/electrical1/32/52547_2.png) [@electrical1](https://discuss.elastic.co/u/electrical1)\
**Post date:** [August 30, 2019, 2:52pm UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/15 "2019-08-30T14:52:46Z")

</div>

So. finally found it. We had `YYYY` in our mappings for the year which of course should have been `yyyy` which has been causing issues.  
Now its all working fine 🙂  
This issue can be closed.  
Thank you so much for your support @Larry_Gregory @alisongoryachev

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [September 3, 2019, 11:51am UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/16 "2019-09-03T11:51:54Z")

</div>

> [@electrical1](#):
>
> So. finally found it. We had `YYYY` in our mappings for the year which of course should have been `yyyy` which has been causing issues.

Ah, great find! Sorry I didn't catch that myself

---

<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:** [October 1, 2019, 11:51am UTC](https://discuss.elastic.co/t/no-results-match-your-search-criteria-error-while-there-is-data/195753/17 "2019-10-01T11:51:58Z")

</div>

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