Additionally For #2.
One way is I can find uri by calling --sem:uri-for-tuple() - to get <uri>
And use -- xdmp:document-delete("<uri>")
However I need to call uri-for-tuple and pass exact values of tuple to find
uri; what I am looking for is ...if there is a way to get a list of all uris
for the docs/tuples I loaded. Like to get list of all uris of documents in
MarkLogic database I can use "for $i in doc() return (document-uri($i))"
Thanks,
Mehul.
From: [email protected]
[mailto:[email protected]] On Behalf Of Shah, Mehul
(LNG-NPV)
Sent: Wednesday, May 25, 2011 10:53 AM
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] NQLoader and naked properties
Thanks for quick response Geert!
For#1, I did the way you have indicated. However I was wondering because for
RecordLoader I could setup one XDBC with default database- db1, but I can load
content to db2 by specifying it in connection string.
CONNECTION_STRING=http://admin:admin@host-1:8012/db2
For#2, For example if I loaded 1000 N-tuple from one file using NQLoader, it
will create 1000 "naked properties"
Now I want to delete them all. How do I get these document uris?
I do not have document uris; if I did "for $i in doc() return
(document-uri($i))" I get nothing.
So how do I use xdmp:document-remove-properties("/bla.xml", xs:QName("test")) ?
Thanks,
Mehul.
From: [email protected]
[mailto:[email protected]] On Behalf Of Geert Josten
Sent: Wednesday, May 25, 2011 10:34 AM
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] NQLoader and naked properties
Hi Mehul,
About 1.
The connection string given below points to a HTTP app server running on
'host-1' using port '8012'. Use the Admin interface of MarkLogic Server to look
it up. The HTTP app server contains a database settings which control against
which modules and documents database (, and which modules root) queries should
be executed.
About 2.
This little piece of code should show how 'naked' properties can be handled:
"initial properties",
xdmp:document-properties("/bla.xml");
"set property",
xdmp:document-set-property("/bla.xml", <test/>);
"properties",
xdmp:document-properties("/bla.xml");
"get doc",
doc("/bla.xml");
"remove property",
xdmp:document-remove-properties("/bla.xml", xs:QName("test"));
"properties",
xdmp:document-properties("/bla.xml");
"del doc",
xdmp:document-delete("/bla.xml");
"properties",
xdmp:document-properties("/bla.xml");
"done"
In short, use xdmp:document-delete to get rid of all properties even if there
is no real document at that uri...
Kind regards,
Geert
Van: [email protected]
[mailto:[email protected]] Namens Shah, Mehul (LNG-NPV)
Verzonden: woensdag 25 mei 2011 16:20
Aan: General MarkLogic Developer Discussion
Onderwerp: [MarkLogic Dev General] NQLoader and naked properties
I am looking at -- http://marklogic.github.com/semantic/#DOCUMENT_FORMAT - and
have couple of questions.
1. NQLoader configuration for connection string has following example
CONNECTION_STRING=http://admin:admin@host-1:8012/insert.xqy
Question: Can I specify which database?
2. Document (N-Tuple) is loaded as properties of an empty document, known
as "naked properties".
Question: These "naked properties" have no associated document; so is there any
way to identify property document? How do I delete them ?
Thank you,
Mehul.
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general