Commit 8cd63cc8 authored by Alok Joshi's avatar Alok Joshi Committed by neelesh thakur
Browse files

change UpdateRequest call

parent 9158153c
......@@ -400,7 +400,8 @@ 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()).doc(this.gson.toJson(sourceMap), XContentType.JSON).docAsUpsert(true);
jaxRsDpsLog.info("Updating record: "+record.getId());
UpdateRequest updateRequest = new UpdateRequest(index, "_doc", record.getId()).doc(this.gson.toJson(sourceMap), XContentType.JSON).docAsUpsert(true);
bulkRequest.add(updateRequest);
}
}
......
......@@ -73,7 +73,7 @@ Feature: Indexing of the documents
Then I should get the 1 documents for the <index_v1> in the Elastic Search
Then I ingest records with the <recordFile> with <acl> for a given <kind_v2>
Then I should get the 1 documents for the <index_v2> in the Elastic Search
Then I should get the 1 documents for the <index_v1> in the Elastic Search
Then I should get the 0 documents for the <index_v1> in the Elastic Search
Examples:
| kind_v1 | index_v1 | recordFile | acl | kind_v2 | index_v2 |
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment