Update document, by moving a node within the document

I have a multiple document, that have nested objects. I need to move the location of the nested objects within the document.

How can i do this, say move users out of groups in the following example:

{
"resourceGroup": "",
"abc": "Ok",
"firstSeen": "2020-03-16T08:45:02.444Z",
"entityId": "29e7d555-1959-4b9b-b663-ce0d04f3e5a7",
"type": "GroupEntity",
"group": {
"onPremisesProvisioningErrors": ,
"mailNickname": "74b06328-1",
"users": [
{
"mail": "abc@aaa.com",
"mailNickname": "sdf"
},
{
"displayName": "test user",
"mailNickname": "testuser1"
}
],}
}

An update of a document is always a full reindex operation. This means you either store the full document again with the correct JSON or you use the Update API - however that one requires you to use scripting in this specific case.

Hope that helps!

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