Hello,
I want to perform a task which requires below activities:
- Override "xyz" record with the new "xyz" record completely (avoid update/merging) in the existing document.
- New "xyz" record structure could be different. Therefore I am preferring to override it with its key name.
I used "new IndexRequest(indexName).id(docId).source(sourceMap, XContentType.JSON)", with below combination:
-
When tried to pass "xyz" as JSONObject got error "cannot write xcontent for unknown value of type class org.json.JSONObject"
-
When tried to pass "xyz" as JsonString got error "tried to parse field [xyz] as object, but found a concrete value"
-
When tried to pass "xyz" as JsonBytes got error "tried to parse field [xyz] as object, but found a concrete value"
-
When tried to pass "xyz" as DTO got error "tried to parse field [xyz] as object, but found a concrete value"
Could someone please assist me in this?
Thanks,
Pradeep Pawar