Updating elasticsearch entities with bulk

I have this database data as below (ES 7.xx) version

   "work":"software dev",
   "work":"software engi",

how can i update the entity which its expirationDate smaller than current Time? to be the current time for example:

the id 00021 is expired because its expiration date is smaller than today then it should updated to current time.

something like void updateExpiredEntity(List<ids> ids,Long currentTime) suing void bulkUpdate(List<UpdateQuery> queries, BulkOptions bulkOptions, IndexCoordinates index);

Please provide me some code implementation

my try, but i know its not all correct

   public void update(UUID id,Long currentDate) {
            UpdateQuery updateQuery = UpdateQuery.builder(id.toString()).withRouting("expirationDate=currentDate")
            elasticsearchTemplate.bulkUpdate(List.of(updateQuery), IndexCoordinates.of("index"));

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