We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
What is the bug? Date formats are not formatted for nested type.
How can one reproduce the bug? Steps to reproduce the behavior:
{ "mappings": { "properties": { "message": { "type": "nested", "properties": { "info": { "type": "keyword", "index": "true" }, "author": { "type": "keyword", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } }, "index": "true" }, "dayOfWeek": { "type": "long" }, "date": { "type": "date", "format": "date" }, "time": { "type": "date", "format": "hour_minute_second" }, "timestamp": { "type": "date", "format": "date_time" } } }, "comment": { "type": "nested", "properties": { "data": { "type": "keyword", "index": "true" }, "likes": { "type": "long" } } }, "myNum": { "type": "long" }, "someField": { "type": "keyword", "index": "true" } } } }
{"index":{"_id":"1"}} {"message":{"info":"a","author":"e","dayOfWeek":1,"date":"1984-04-12","time":"08:47:52","timestamp":"1984-04-12T08:47:52.000Z"},"comment":{"data":"ab","likes":3},"myNum":1,"someField":"b"} {"index":{"_id":"2"}} {"message":{"info":"b","author":"f","dayOfWeek":2,"date":"2023-05-30","time":"06:50:16","timestamp":"2023-05-30T06:50:16.000Z"},"comment":{"data":"aa","likes":2},"myNum":2,"someField":"a"} {"index":{"_id":"3"}} {"message":{"info":"c","author":"g","dayOfWeek":1,"date":"1974-12-11","time":"01:25:02","timestamp":"1974-12-11T01:25:02.000Z"},"comment":{"data":"aa","likes":3},"myNum":3,"someField":"a"} {"index":{"_id":"4"}} {"message":[{"info":"c","author":"h","dayOfWeek":4,"date":"1995-03-17","time":"08:24:02","timestamp":"1995-03-17T08:47:52.000Z"},{"info":"a","author":"i","dayOfWeek":5,"date":"2009-03-17","time":"11:58:08","timestamp":"2009-03-17T11:58:08.000Z"}],"comment":{"data":"ab","likes":1},"myNum":4,"someField":"b"} {"index":{"_id":"5"}} {"message": [{"info":"zz","author":"zz","dayOfWeek":6,"date":"2015-03-03","time":"06:51:55","timestamp":"2015-03-03T06:51:55.000Z"}],"comment":{"data":["aa","bb"],"likes":10},"myNum":[3,4],"someField":"a"}
SELECT nested(message.timestamp) FROM nested_date
+--------------------------+ | nested(message.timestamp)| |--------------------------| | 1984-04-12T08:47:52.000Z | | 2023-05-30T06:50:16.000Z | | 1974-12-11T01:25:02.000Z | | 1995-03-17T08:47:52.000Z | | 2009-03-17T11:58:08.000Z | | 2015-03-03T06:51:55.000Z | +--------------------------+
What is the expected behavior? It should format the date string based on the format specified in the mappings file. Result should be:
+---------------------+ | message.timestamp | |---------------------| | 1984-04-12 08:47:52 | | 2023-05-30 06:50:16 | | 1974-12-11 01:25:02 | | 1995-03-17 08:47:52 | | 2015-03-03 06:51:55 | +---------------------+
What is your host/environment?
Do you have any additional context? Root cause may be that nested function gets data from the hits and ignores parsing of date string.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What is the bug?
Date formats are not formatted for nested type.
How can one reproduce the bug?
Steps to reproduce the behavior:
SELECT nested(message.timestamp) FROM nested_date
What is the expected behavior?
It should format the date string based on the format specified in the mappings file. Result should be:
What is your host/environment?
Do you have any additional context?
Root cause may be that nested function gets data from the hits and ignores parsing of date string.
The text was updated successfully, but these errors were encountered: