Convert long date to date

Hi Guys,

I want to transformthe creationDate from long to timestamp date ("format" : "MMM/dd/yyyy HH:mm:ss", ). I checked the documentation with no result.

JSON serach result:
"creationDate": 1490254211904,

Mapping of the property:
"creationDate": {
"type": "long"

Any idea?

Best regards


In elasticsearch?

You can't really change the internal format or the _source document (unless you are using date ingest processor) but if you create the right mapping and tell elasticsearch that your field is a date that should work


Merci David.

I'm using an ESB solution, it create the index, when I change the mapping for creationDate the ESB restore the old mapping.

Best regards

Ismael :wink:

Avec plaisir !

I did not understand your answer. Did you mean that you solved the issue?

re David,

No, I just indicate that our ESB generate the index and I can't change the
mapping of the index.

Best regards

Create an index template in elasticsearch then. It will be applied to the index when it gets created.

Hi David,

Yes it's working.

Merci pour ton aide. :sunny: )

Best regards


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