[MarkLogic Dev General] Marklogic node replace

2014-12-08 Thread Raghu
Hi all, I have two xqueries ___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general

Re: [MarkLogic Dev General] Marklogic node replace

2014-12-08 Thread Raghu
Accidental send. Typing up now. Sorry for the inconvenience On Mon, Dec 8, 2014 at 6:46 AM, David Ennis david.en...@hinttech.com wrote: Could you please elaborate. Kind Regards, David Ennis David Ennis *Content Engineer* [image: HintTech] http://www.hinttech.com/ Mastering the

[MarkLogic Dev General] Marklogic node replace of same node results in inconsistent output

2014-12-08 Thread Raghu
Hi all, I have two xqueries xquery# 1. Sleeps for 10 secs (xdmp:sleep) and updates an existing node with a new value and logs the value Executing #1. xquery# 2. Updates the same node which is being updated in xquery #1 but no sleep and logs the value Executing #2. I am

[MarkLogic Dev General] document insert inside a cpf module

2014-12-08 Thread diwakar.narayanaswamy
Hi, After ingesting a document(book), a pipeline executes an action module. The action module splits the document into chapters and ingest the chapters into MarkLogic one by one. Every thing is working fine, except the chapters are not getting ingested using xdmp:document-insert.

Re: [MarkLogic Dev General] document insert inside a cpf module

2014-12-08 Thread David Ennis
HI. Not sure how you are ingesting them, but perhaps you are seeing the same hiccup that is described in this nice little writeup: http://blog.davidcassel.net/2011/06/splitting-data-with-info-studio/ Kind Regards, David Ennis David Ennis *Content Engineer* [image: HintTech]

Re: [MarkLogic Dev General] document insert inside a cpf module

2014-12-08 Thread Dave Cassel
The hiccup described in that post is specific to ingestion with Information Studio. Diwakar, have you put an xdmp:log statement into your module to confirm that it's getting called? Could you share your CPF config? You can do inserts with CPF, so I'm guessing that either the pipeline

Re: [MarkLogic Dev General] document insert inside a cpf module

2014-12-08 Thread diwakar.narayanaswamy
Hi Dave, ? All of my logs are getting called including the one after the insert statement, I have pasted my code below. I tried inserting without xdmp:eval statement as well, but it did not work out xquery version 1.0-ml; import module namespace cpf = http://marklogic.com/cpf; at

Re: [MarkLogic Dev General] Marklogic node replace of same node results in inconsistent output

2014-12-08 Thread Raghu
Thanks David Ennis, PFB the response below 1. The second xquery doesn't have a sleep, that was a copy paste error on my part. 2. I'm verifying the document content by using the qconsole explore button and clicking on the link. 3. The sleep would not lock, but the node replace statement in the

Re: [MarkLogic Dev General] Marklogic node replace of same node results in inconsistent output

2014-12-08 Thread Raghu
I've used two different browsers for each qconsole, yet the same results. On Mon, Dec 8, 2014 at 8:49 PM, Raghu raghupathy.visweswa...@gmail.com wrote: Thanks David Ennis, PFB the response below 1. The second xquery doesn't have a sleep, that was a copy paste error on my part. 2. I'm

Re: [MarkLogic Dev General] Unsubscribe

2014-12-08 Thread Erik Zander
Terry You may unsubscribe at the following link http://developer.marklogic.com/mailman/listinfo/general Regards Erik Från: Austin, Theresa [mailto:] Skickat: den 8 december 2014 14:43 Till: General@developer.marklogic.com Ämne: [MarkLogic Dev General] Unsubscribe Good morning. Please remove me

Re: [MarkLogic Dev General] Marklogic node replace of same node results in inconsistent output

2014-12-08 Thread Ron Hitchens
Two things of note: 1) An update request does not see its own updates. Fetching the value of something from the database after an update to that thing will return the value from the database as-of the time the request started running. 2) It is possible for deadlocks to occur, especially

Re: [MarkLogic Dev General] Marklogic node replace of same node results in inconsistent output

2014-12-08 Thread Raghu
Hi Ron, 1) An update request does not see its own updates. Fetching the value of something from the database after an update to that thing will return the value from the database as-of the time the request started running. - I totally agree Ron, I'm checking the value by exploring the

Re: [MarkLogic Dev General] Marklogic node replace of same node results in inconsistent output

2014-12-08 Thread Danny Sokolsky
Hi Frank, Or how about if you do a language-sensitive search. For example: let $doc := a b id=car c xml:lang=encar/c c xml:lang=nlauto/c c xml:lang=frvoiture/c /b

Re: [MarkLogic Dev General] Marklogic node replace of same node results in inconsistent output

2014-12-08 Thread Whitby, Rob
How about this? $doc/b[c eq (kind, auto) and c/@xml:lang eq nl]/@id/fn:string() From: Frank Mortier f.mort...@dsvlaw.bemailto:f.mort...@dsvlaw.be Reply-To: MarkLogic Developer Discussion general@developer.marklogic.commailto:general@developer.marklogic.com Date: Monday, 8 December 2014 18:01

Re: [MarkLogic Dev General] Marklogic node replace of same node results in inconsistent output

2014-12-08 Thread Tim
I haven’t taken the time to experiment, but try where $x = (fn:tokenize('auto, kind', ',')) Tim M. From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Frank Mortier Sent: Monday, December 08, 2014 1:02 PM To: MarkLogic

Re: [MarkLogic Dev General] Marklogic node replace of same node results in inconsistent output

2014-12-08 Thread Frank Mortier
Thanks Danny, I need to get from the string ('auto, kind') to ('auto', 'kind'). Chris, it should return 'car' and 'child'. Tim, does not work, returns only the first id 'car' Rob, same answer as for Danny. -Original Message- From: general-boun...@developer.marklogic.com

Re: [MarkLogic Dev General] Marklogic node replace of same node results in inconsistent output

2014-12-08 Thread Danny Sokolsky
You already know how to do that. Just do something like this (passing a sequence into a word-query treats each item as an or): let $s := (fn:tokenize(auto, kind, ,)) let $doc := a b id=car c xml:lang=encar/c c xml:lang=nlauto/c

Re: [MarkLogic Dev General] Marklogic node replace of same node results in inconsistent output

2014-12-08 Thread Michael Gursky
I think you need to either get rid of the space in auto, kind or change , to , in your call to fn:tokenize(). fn:tokenize(auto, kind, ,) returns auto and kind (note leading space), so the second token matches nothing. On Mon, Dec 8, 2014 at 1:48 PM, Danny Sokolsky danny.sokol...@marklogic.com

Re: [MarkLogic Dev General] Marklogic node replace of same node results in inconsistent output

2014-12-08 Thread Frank Mortier
Dear Danny, indeed I know how to do that. Dear Christophe and Michael, indeed I need to get rid of the space. Thanks for pointing the obvious out to me. Apparently, however, this is not an issue in Danny's solution. Hence, I will go for Danny's solution. Thanks, Frank -Original

Re: [MarkLogic Dev General] Marklogic node replace of same node results in inconsistent output

2014-12-08 Thread Florent Georges
On 8 December 2014 at 19:01, Frank Mortier wrote: $doc/b/c[@xml:lang eqnl] By the way, do not use string comparison directly against @xml:lang, use fn:lang() instead: $doc/b/c[lang('nl')]. Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/

Re: [MarkLogic Dev General] Optimal buffer size when streaming out files

2014-12-08 Thread ville
Hi, the streaming is mainly used for large files, ie. binary downloads which range from some MB to 4GB, averaging on 10-30MB. I don't think having some kibs will hurt, without the streaming we used to store the whole file to memory before sending it out.. Thank you for the input! Ville