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

GetIndexResponse IndexSettings creationDate is returned as String (not Date) #37

Open
lubbo opened this issue Jul 26, 2019 · 1 comment
Milestone

Comments

@lubbo
Copy link

lubbo commented Jul 26, 2019

The response of GetIndexRequest returns a wrong data type for Index settings field creation_date and the deserialization fails.

{ "settings": { "index": {
"creation_date": "1563813426580",
"number_of_shards": "1", "number_of_replicas": "1", "uuid": "N-yD3XmlQd28E9iR4iIliA", "version": { "created": "7000199" },

It's really weird but Elastic returns creation_date as String containing a date in epoch format (seconds from 1970).

@prafsoni
Copy link
Contributor

JsonDecoder needs date formatter in order to serialize string as date. A good default date formatter is required in order to achieve this. This also indicates scope of improvement in default serializer. Maybe these things need to be configurable in settings.
If you can have a PR I can include this in alpha9.

FYI use master branch

@prafsoni prafsoni added this to the alpha.10 milestone Aug 2, 2019
@prafsoni prafsoni modified the milestones: alpha.10, Backlog Aug 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants