Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discover]view surrounding documents on date_nanos field, the result incorrect #48064

Closed
chgxtony opened this issue Oct 14, 2019 · 8 comments · Fixed by #54089
Closed

[Discover]view surrounding documents on date_nanos field, the result incorrect #48064

chgxtony opened this issue Oct 14, 2019 · 8 comments · Fixed by #54089
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@chgxtony
Copy link

chgxtony commented Oct 14, 2019

Kibana version:
v7.3.2
Elasticsearch version:
v7.3.2
Server OS version:
ubuntu 16.04
Browser version:
chrome 77
Browser OS version:
mac 10.14
Original install method (e.g. download page, yum, from source, etc.):
source
Describe the bug:
View surrounding documents on date_nanos field, the surrounding documents is incorrect, diff 8 hours.

image

@chgxtony chgxtony changed the title view surrounding documents on date_nanos field, the result incorrect [Discovery]view surrounding documents on date_nanos field, the result incorrect Oct 15, 2019
@chgxtony chgxtony changed the title [Discovery]view surrounding documents on date_nanos field, the result incorrect [Discover]view surrounding documents on date_nanos field, the result incorrect Oct 15, 2019
@azasypkin azasypkin added Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Oct 15, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@timroes
Copy link
Contributor

timroes commented Oct 18, 2019

@kertal is this currently one of the known limitations of Date Nanos? Or something we’re not yet aware of?

@kertal kertal self-assigned this Oct 18, 2019
@kertal
Copy link
Member

kertal commented Oct 18, 2019

@timroes this should work
@chgxtony I'd be interested in the RAW JSON value of event_time of these 3 hits, when you expand a document, what's the value in JSON of event_time? thx!

@chgxtony
Copy link
Author

@kertal
image
view surrounding documents :
image

@kertal
Copy link
Member

kertal commented Nov 19, 2019

Sorry for the long delay. it seems you using a custom date format, that's why it doesn't work
Standard format in Date datatype in Elasticsearch is strict_date_optional_time||epoch_millis
https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html
Which date format are you using? thx!

@chgxtony
Copy link
Author

chgxtony commented Nov 22, 2019

I specify the format :
"event_time" : { "type" : "date_nanos", "format" : "yyyy-MM-dd HH:mm:ss.SSSSSS" }, it not work

when I use the format:
"event_time" : { "type" : "date", "format" : "yyyy-MM-dd HH:mm:ss.SSSSSS" }, it works

@kertal
Copy link
Member

kertal commented Nov 22, 2019

thx, will try that format. I'm pretty sure it would work if you'd use the standard datatype.

@kertal kertal added the bug Fixes for quality problems that affect the customer experience label Dec 21, 2019
@kertal
Copy link
Member

kertal commented Dec 21, 2019

We found the cause of this behavior, it's due to the custom format you're using, there is no timezone information in it (Like a Z for UTC). We use a workarounds for date_nanos format to generate the search_aftervalue, since the browsers don't 64bit numbers natively. The browser takes your local timezone in this case. We will provide a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants