Skip to content

Unable to open index in Discover and Visualize when date format is epoch_millis #19858

@pheyos

Description

@pheyos

Kibana version: 6.x (currently 6.4) and master (currently 7.0)

Elasticsearch version: 6.x (currently 6.4) and master (currently 7.0)

Server OS version: Ubuntu 18.04

Browser version: Firefox latest, Chromium latest

Browser OS version: Ubuntu 18.04

Original install method (e.g. download page, yum, from source, etc.): Download archives from staging

Describe the bug:
When selecting an index pattern for an index with a date field of format epoch_millis, an error message is shown and no data is loaded (see screenshot of error message below).

Steps to reproduce:

  1. Create two indices as follows (only difference: first one with time_format explicitely set to epoch_millis and second one with automatic time_format):
PUT test_epochmilli_1
{
  "settings" : {
        "number_of_shards" : 1,
        "number_of_replicas" : 0
  },
  "mappings": {
    "doc": {
      "properties": {
        "@timestamp": {
          "type": "date",
          "format": "epoch_millis"
        },
        "name": {
          "type": "keyword"
        }
      }
    }
  }
}

PUT test_epochmilli_2
{
  "settings" : {
        "number_of_shards" : 1,
        "number_of_replicas" : 0
  },
  "mappings": {
    "doc": {
      "properties": {
        "@timestamp": {
          "type": "date"
        },
        "name": {
          "type": "keyword"
        }
      }
    }
  }
}
  1. Create the same document with epoch millisecond date in both indices:
PUT test_epochmilli_1/doc/1
{
  "@timestamp": 1477954800000,
  "name": "some_name"
}

PUT test_epochmilli_2/doc/1
{
  "@timestamp": 1477954800000,
  "name": "some_name"
}
  1. Create two corresponding index patterns: test_epochmilli_1 and test_epochmilli_2 (with time field @timestamp)
  2. Open test_epochmilli_2 in Discover (or render a data histogram in Visualize)
  • => This works
  1. Open test_epochmilli_1 in Discover (or render a data histogram in Visualize)
  • => An error message is shown

Expected behavior:

  • test_epochmilli_1 should work like test_epochmilli_2

Screenshots (if relevant):
image

Any additional context:

  • In version 6.3.0-bc11 this error didn't occur
  • Searching the index works fine (via GET test_epochmilli_1/_search)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature:elasticsearchbugFixes for quality problems that affect the customer experiencev6.4.0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions