diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexerServiceImpl.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexerServiceImpl.java index 36d0bcdcf6b4a4fb3af176a6b742a1035e6cd1f5..c7d1301a000f39f6d6f6daf94cfce95323ee60df 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexerServiceImpl.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/IndexerServiceImpl.java @@ -400,7 +400,7 @@ public class IndexerServiceImpl implements IndexerService { IndexRequest indexRequest = new IndexRequest(index).id(record.getId()).source(this.gson.toJson(sourceMap), XContentType.JSON); bulkRequest.add(indexRequest); } else if (operation == OperationType.update) { - UpdateRequest updateRequest = new UpdateRequest(index, record.getId()).upsert(this.gson.toJson(sourceMap), XContentType.JSON); + UpdateRequest updateRequest = new UpdateRequest(index, record.getId()).doc(this.gson.toJson(sourceMap), XContentType.JSON).docAsUpsert(true); bulkRequest.add(updateRequest); } }