[MarkLogic Dev General] Timestamp of the document when it was
loaded
David Sewell
dsewell at virginia.edu
Thu Jul 3 06:35:38 PDT 2008
You can have the server maintain a "last modified" timestamp via the
Admin console: under Databases, select the database, then the Configure
tab, then set "maintain last modified" to TRUE. After that, calling
xdmp:document-get-properties($fileURI, xs:QName("prop:last-modified"))
will return the last-modified date. The server handles this
automatically.
However, that timestamp changes every time you modify the file. So if
you wanted a permanent timestamp showing the first load time, so far as
I know you would have to use xdmp:document-add-properties() as a
separate step to create a special property containing the timestamp at
loading. You could do this as part of a custom load script.
DS
On Thu, 3 Jul 2008, Isha Chadha wrote:
>
>
> Hi,
>
>
>
> Would really appreciate an answer to this...
>
> How to get the timestamp of the document when it was first loaded in the
> database.
>
>
>
> Thanks,
>
> Isha Chadha
>
>
>
>
>
>
--
David Sewell, Editorial and Technical Manager
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: dsewell at virginia.edu Tel: +1 434 924 9973
Web: http://rotunda.upress.virginia.edu/
More information about the General
mailing list