lp:serialize-cts-query() Unfortunately, this will not serialize ALL cts:queries. I would want to pass around any cts:query within search:criteria node. However, this is all "automatic" in 4.1, which is very nice.
Thx though -Paul --- On Thu, 9/24/09, [email protected] <[email protected]> wrote: From: [email protected] <[email protected]> Subject: General Digest, Vol 63, Issue 58 To: [email protected] Date: Thursday, September 24, 2009, 5:05 PM Send General mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit http://xqzone.com/mailman/listinfo/general or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of General digest..." Today's Topics: 1. general serialization of cts (Paul M) 2. Re: general serialization of cts (Wayne Feick) 3. Finding locks (Runstein, Robert E. (Contr) (IS)) 4. Re: Finding locks (Michael Blakeley) 5. RE: general serialization of cts (Mark Helmstetter) 6. Error while loading large XML document (Josh Daymont) ---------------------------------------------------------------------- Message: 1 Date: Thu, 24 Sep 2009 13:28:40 -0700 (PDT) From: Paul M <[email protected]> Subject: [MarkLogic Dev General] general serialization of cts To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset="iso-8859-1" let $dc as element() := <fff>123</fff> let $dc-q := <outside-tag>{xdmp:quote($c)}</outside-tag> let $dc-qt := $dc-q/text() let $dc-uq as element():= xdmp:unquote($dc-qt,"","format-xml")/node() let $cts-e as cts:query := cts:word-query("tilt", ("lang=en"), 1) let $cts-e-q := <outside-tag>{xdmp:quote($cts-e)}</outside-tag> let $cts-e-qt := $cts-e-q/text() let $dc-uq as cts:query:= xdmp:unquote($cts-e-qt,"","format-xml")/node() cast as cts:query (:this does not work:) return $cts-e-q The $dc-uq stmt does not work. Cast exception. I am attempting to create general method to serialize any cts:query without using lib parser. Even possible? xdmp:quote works on any item,correct? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://xqzone.marklogic.com/pipermail/general/attachments/20090924/fe101b9d/attachment-0001.html ------------------------------ Message: 2 Date: Thu, 24 Sep 2009 13:48:24 -0700 From: Wayne Feick <[email protected]> Subject: Re: [MarkLogic Dev General] general serialization of cts To: General Mark Logic Developer Discussion <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset="us-ascii" All of the cts queries serialize/deserialize as a feature of the server. Placing a query into an element turns it into its xml representation, and the cts:query() constructor turns the xml representation back into a query. let $cts-e as cts:query := cts:word-query("tilt", ("lang=en"), 1) let $cts-e-q := <outside-tag>{$cts-e}</outside-tag> let $cts-e2 := cts:query($cts-e-q/element()) return ($cts-e2, xdmp:describe($cts-e2)) On Thu, 2009-09-24 at 13:28 -0700, Paul M wrote: > let $dc as element() := <fff>123</fff> > let $dc-q := <outside-tag>{xdmp:quote($c)}</outside-tag> > let $dc-qt := $dc-q/text() > let $dc-uq as element():= xdmp:unquote($dc-qt,"","format-xml")/node() > > let $cts-e as cts:query := cts:word-query("tilt", ("lang=en"), 1) > let $cts-e-q := <outside-tag>{xdmp:quote($cts-e)}</outside-tag> > let $cts-e-qt := $cts-e-q/text() > let $dc-uq as cts:query:= > xdmp:unquote($cts-e-qt,"","format-xml")/node() cast as cts:query > (:this does not work:) > > > return $cts-e-q > > The $dc-uq stmt does not work. Cast exception. I am attempting to > create general method to serialize any cts:query without using lib > parser. Even possible? xdmp:quote works on any item,correct? > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://xqzone.marklogic.com/pipermail/general/attachments/20090924/8b137b2f/attachment-0001.html ------------------------------ Message: 3 Date: Thu, 24 Sep 2009 16:26:16 -0500 From: "Runstein, Robert E. (Contr) (IS)" <[email protected]> Subject: [MarkLogic Dev General] Finding locks To: <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset="us-ascii" Is there a way to find documents that are locked using the Admin Console? If not, is there a query than can be run in cq to find locked documents? Bob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://xqzone.marklogic.com/pipermail/general/attachments/20090924/7cdf0d7d/attachment-0001.html ------------------------------ Message: 4 Date: Thu, 24 Sep 2009 14:27:51 -0700 From: Michael Blakeley <[email protected]> Subject: Re: [MarkLogic Dev General] Finding locks To: General Mark Logic Developer Discussion <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset=UTF-8; format=flowed On 2009-09-24 14:26, Runstein, Robert E. (Contr) (IS) wrote: > Is there a way to find documents that are locked using the Admin Console? If > not, is there a query than can be run in cq to find locked documents? http://developer.marklogic.com/pubs/4.1/apidocs/Ext-9.html#xdmp:document-locks says that it "Returns the locks for all documents and directories in the database if no parameter is given." -- Mike ------------------------------ Message: 5 Date: Thu, 24 Sep 2009 15:40:06 -0700 From: Mark Helmstetter <[email protected]> Subject: RE: [MarkLogic Dev General] general serialization of cts To: General Mark Logic Developer Discussion <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset="us-ascii" Paul, What version of the server are you running? Automatic serialization/deserialization is a feature of MarkLogic 4.x. If you happen to be running 3.2, now would be a good time to upgrade? :) Otherwise, there is a lib-parser module buried within lib-search in the workshop (http://xqzone.marklogic.com/svn/lib-search/trunk/release/lib-parser.xqy). There you will find the functions lp:serialize-cts-query() and lp:deserialize-query() that may provide what you need. Note that there are some minor incompatibilities between the format used by lib-parser and the format baked into the server in 4.x. Just keep that in mind when it's time to upgrade. --Mark _____ From: [email protected] [mailto:[email protected]] On Behalf Of Wayne Feick Sent: Thursday, September 24, 2009 4:48 PM To: General Mark Logic Developer Discussion Subject: Re: [MarkLogic Dev General] general serialization of cts All of the cts queries serialize/deserialize as a feature of the server. Placing a query into an element turns it into its xml representation, and the cts:query() constructor turns the xml representation back into a query. let $cts-e as cts:query := cts:word-query("tilt", ("lang=en"), 1) let $cts-e-q := <outside-tag>{$cts-e}</outside-tag> let $cts-e2 := cts:query($cts-e-q/element()) return ($cts-e2, xdmp:describe($cts-e2)) On Thu, 2009-09-24 at 13:28 -0700, Paul M wrote: let $dc as element() := <fff>123</fff> let $dc-q := <outside-tag>{xdmp:quote($c)}</outside-tag> let $dc-qt := $dc-q/text() let $dc-uq as element():= xdmp:unquote($dc-qt,"","format-xml")/node() let $cts-e as cts:query := cts:word-query("tilt", ("lang=en"), 1) let $cts-e-q := <outside-tag>{xdmp:quote($cts-e)}</outside-tag> let $cts-e-qt := $cts-e-q/text() let $dc-uq as cts:query:= xdmp:unquote($cts-e-qt,"","format-xml")/node() cast as cts:query (:this does not work:) return $cts-e-q The $dc-uq stmt does not work. Cast exception. I am attempting to create general method to serialize any cts:query without using lib parser. Even possible? xdmp:quote works on any item,correct? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://xqzone.marklogic.com/pipermail/general/attachments/20090924/45828b3c/attachment-0001.html ------------------------------ Message: 6 Date: Thu, 24 Sep 2009 17:05:34 -0700 From: Josh Daymont <[email protected]> Subject: [MarkLogic Dev General] Error while loading large XML document To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset="iso-8859-1" I am attempting to load a large xml file in order to process it flatten it in memory. The document itself is around 80mb and the code I have written uses a FLWOR statement to break it into about 30k new documents which are to be loaded into a collection. Before my FLWOR finishes I get the following error: XDMP-EXPNTREECACHEFULL: Expanded tree cache full on host temp.marklogic [1.0-ml] I have set the db's in memory list size and in memory tree size to 256mb. I have read on other threads here that this is caused by large numbers of documents remaining in scope during the execution of a single query. However I am not sure how the newly created documents would remain in scope. Can anyone advise on best practices for performing this sort of action. The code looks like this: xdmp:load("/tmp/items.xml", "items.xml"); for $item in doc("items.xml")//item let $newitem := element { "item" } { attribute { "owner" } { $item/@owner } , element { "timestamp" } { current-dateTime() }, for $price in $item/price return <price>{ $price }</price> } return xdmp:document-insert( fn:concat( fn:concat("/item/", xs:string($newitem/@owner)), current-dateTime() ) , $item) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://xqzone.marklogic.com/pipermail/general/attachments/20090924/887e7c72/attachment.html ------------------------------ _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general End of General Digest, Vol 63, Issue 58 ***************************************
_______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
