So my takeaway is that there was a glitch, but the behavior in more 
recent releases conforms to the documentation.  Thanks, everyone

-Mike

On 08/28/2014 01:09 PM, Danny Sokolsky wrote:
> My test was with directory-creation=automatic.  You also get the same 
> behavior (XDMP-DOCNOTFOUND ) with directory-creation=manual-enforced.
>
> I think this makes sense, although the documentation could certainly be more 
> clear about it ;)
>
> -Danny
>
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Michael Blakeley
> Sent: Thursday, August 28, 2014 9:33 AM
> To: MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] possible bug w/directory deletion
>
> With 7.0-3 on OSX and directory-creation=manual, I don't see a 
> XDMP-DOCNOTFOUND error either.
>
> xdmp:describe(doc("/test/"));
> xdmp:describe(xdmp:document-properties("/test/"));
> xdmp:directory-create("/test/");
> xdmp:describe(xdmp:document-properties("/test/"));
> xdmp:document-delete("/test/");
> xdmp:describe(xdmp:document-properties("/test/"));
>
> =>
> ()
> ()
> xdmp:document-properties("/test/")
> ()
>
> I think that agrees with what Mike described. The first two expressions 
> return (), verifying that I didn't have a pre-existing document or directory 
> at '/test/'. Then we see a properties element, verifying that the directory 
> was created. Then xdmp:document-delete succeeds where the docs say it won't. 
> Afterward there's no directory property at '/test/'.
>
> -- Mike
>
> On 28 Aug 2014, at 08:45 , Danny Sokolsky <[email protected]> 
> wrote:
>
>> Hi Mike,
>>
>> I am not seeing this in 7.0-3.  If you try to do a document-delete on a 
>> directory /test/, I am seeing XDMP-DOCNOTFOUND.
>>
>> Are you sure you did not create a document at the /test/ uri?
>>
>> -Danny
>>
>> -----Original Message-----
>> From: [email protected] 
>> [mailto:[email protected]] On Behalf Of Mike Sokolov
>> Sent: Thursday, August 28, 2014 7:00 AM
>> To: MarkLogic Dev General
>> Subject: [MarkLogic Dev General] possible bug w/directory deletion
>>
>> The documentation for xdmp:document-delete() says that it deletes a document 
>> and all its properties *except for the directory property*.
>>
>> However, the following sequence of queries results in an empty properties 
>> document (using 7.0-2.3):
>>
>> xdmp:directory-create("/test/");
>> xdmp:document-delete("/test/");
>> xdmp:document-properties("/test/");
>>
>> with directory creation set to either "manual" or "automatic"
>>
>> I have a workaround, but I think that is a bug?  However it's in such direct 
>> contradiction to the documentation that I wonder if I am misreading that.
>>
>> - Mike
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://developer.marklogic.com/mailman/listinfo/general
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://developer.marklogic.com/mailman/listinfo/general
>>
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to