Hi, Shiv:

A patch request returns a 204 if none of the operations match on the patched 
document.

That's an indication to check the paths in the operations to make sure they 
match the structure and vocabulary of the target JSON document.

The patch from your earlier post would change this document:

{..., "parent":{..., "childe":{...}, ...}, ...}

into this document

{..., "parent":{..., "childe":{..., "image":"/example/scdhhs_fm_300.pdf"}, 
...}, ...}

Without the actual patch operations and actual target document structure, no 
one can make more specific suggestions.


Erik Hennum


________________________________
From: general-boun...@developer.marklogic.com 
[general-boun...@developer.marklogic.com] on behalf of Shiv Shankar 
[shiv.shivshan...@gmail.com]
Sent: Tuesday, August 23, 2016 3:12 AM
To: general@developer.marklogic.com
Subject: Re: [MarkLogic Dev General] General Digest, Vol 146, Issue 46

Hi Erik,
Thanks for quick reply,
With the error message, I see we can PATCH only json/XML.

So, to have the PDF linked to current document, I would like to do the 
following.
1. Load binary document with a URI  ( ex: /documents/drivier-license.pdf)
2. Add this uri ( /documents/drivier-license.pdf) to existing document as a 
patch)

When I did the same above, i.e adding a json as part of content 
{"uri":"/documents/drivier-license.pdf"} as a PATCH, it is coming as 204 
unchanged.
Please advice.

Regards
Shiv.

_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to