Elasticsearch 7.5 upgrade


I am trying to upgrade our application to use elasticsearch 7.5.1 from 6.x. Our application updates a date field using painless script by calling updateByQuery on the RestHighLevelClient.

In elasticsearch the field type is date and the format is 'strict_date_hour_minute_second_millis'. When we are using painless script to update the field , value 'Z' is added and the update fails because the painless script date format is not matching the field format in ES.

I can fix the issue by passing date as string in the painless script rather than LocalDateTime object. I am just wondering is there any other way to fix this issue? or Am I doing something wrong?

Thank you

Hi @uk300,

Yes there's other solution, one of them depends on how much data you have is reindexing the data of your index and use ingest to reformat your date.

Here the doc for reindexing
and for ingest:

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