I'm working with a system that requires directories and directory-modified timestamps (for a webDAV-like browsing feature), but have found that automatic directory creation introduces unacceptable lock contention during bulk updates, so I am looking into managing the directory creation and timestamp updates manually.

I have one question, and one strange observation - maybe a bug. I'm working with 7.0-2.3.

First the question: how should I update the prop:last-modified property?

Updating it explicitly raises an error:


     XDMP-ARG: xdmp:document-set-property("/books/",
     <prop:last-modified
     
xmlns:prop="http://marklogic.com/xdmp/property";>2014-05-22T15:53:46.724003+02:00</prop:last-modified>)
     -- Invalid argument

even though I have "maintain directory last modified" set to false (and directory creation = manual). I do have maintain last modified set to true, so I expect that is happening automatically on directory creation - OK, but in that instance how would I update the directory modified time when inserting or deleting documents in the directory?

I tried adding a dummy property using xdmp:set-property, and that does seem to update the timestamp, but I don't really want to do that if I don't have to, of course. Perhaps I could delete and then recreate the directory properties document, but that doesn't seem great either. Any other ideas?

Now the weird observation. It seems that every time I modify the directory properties document, it gets another <prop:directory /> property node! Currently I have:

<prop:properties xmlns:prop="http://marklogic.com/xdmp/property";>
<prop:directory/>
<prop:directory/>
<prop:directory/>
<prop:directory/>
<prop:directory/>
<prop:directory/>
<prop:directory/>
<prop:directory/>
<prop:directory/>
<prop:directory/>
<prop:last-modified>2014-05-22T15:47:37+02:00</prop:last-modified>
</prop:properties>

I thought that properties documents maintained a map with unique keys?

-Mike

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

Reply via email to