N1QL ARRAY_APPEND() function appends at the end of existing array. One in java might be using different approach directly with KV. You can try N1QL query
UPDATE bucket AS b USE KEYS "docid"
SET b.arrayx = ARRAY_APEND(b.arrayx, "new element")
N1QL ARRAY_APPEND() function appends at the end of existing array. One in java might be using different approach directly with KV. You can try N1QL query
UPDATE bucket AS b USE KEYS "docid"
SET b.arrayx = ARRAY_APEND(b.arrayx, "new element")