Re: [MarkLogic Dev General] Adding PDF to an existing json document using Patch

2016-08-22 Thread Erik Hennum
Hi, Shiv: Sorry, but I don't understand the question. You cannot store a PDF document and JSON document in a single document. A PDF document is a binary. A JSON document is a structured tree. You cannot patch a binary document. It is a black box without addressable structure. What are the u

Re: [MarkLogic Dev General] Model Employee-Department relationship into marklogic, Running Join queries. #CGO#

2016-08-22 Thread Gaƫl YIMEN YIMGA
Hello Abhi, You definitely need a web application server like Tomcat, it's the one that I used. You could use maven to build the project as a WAR and then deploy that WAR file in Tomcat. Then the project works as a web service, so You can test it using a tool like POSTMAN or FIDDLER or simply a c

[MarkLogic Dev General] root collation vs unicode collation in terms of performance

2016-08-22 Thread Yalaverthi, Sudheer (LNG-RDU)
Hi, In one of older developer community threads here, I have found this statement from Mary. "If you are not collapsing values, the codepoint collation is generally about 10% faster in its operations." We have few elem

[MarkLogic Dev General] Adding PDF to an existing json document using Patch

2016-08-22 Thread Shiv Shankar
Hi Erik Hennum If I go with PUT, it is replacing the entire document,which is not acceptable. How to add json document+pdf in one document ? I used below approach 1. Added a PDF as a separate document and tried adding that uri as part of PATCH to referring document, but getting message 204 curl

Re: [MarkLogic Dev General] Why does fn:replace gives an error when second argument exceeds certain length

2016-08-22 Thread Florent Georges
I see... So I guess the question is not "Why does ML treat the second argument as a string or as a regex sometimes?" The second argument is always a string, which must be a valid lexical regular expression. But would rather be: "Do you confirm ML has a limitation on the length of a regex, which

Re: [MarkLogic Dev General] Why does fn:replace gives an error when second argument exceeds certain length

2016-08-22 Thread Johan de Boer
All, I have simplified my example in the XQuery Console to: let $string1 := "" let $string2 := "" let $length-1 := 1463 let $length-2 := 1464 let $string3 := fn:string-join (for $a in 1 to $length-1 return 'x') return fn:replace($string1,$string3,$string2) Now using the le

Re: [MarkLogic Dev General] Model Employee-Department relationship into marklogic, Running Join queries. #CGO#

2016-08-22 Thread Jain, Abhishek
Hi Gael, Thanks, I found it so useful but I am new to JAVA, I tried my best to install it. however- 1. I set up the code through eclipse MVN build fails (MVN clean looks good) , do we need any app server ? 2. Can you please send me quick steps to use it OR add some description

Re: [MarkLogic Dev General] Why does fn:replace gives an error when second argument exceeds certain length

2016-08-22 Thread Florent Georges
Hi, Not sure about the details of the length (it's hard to look at a non-reduced example containing a lot of noise), but you pass $piece-of-xml (or at least a substring of it) as a regex to fn:replace(). So MarkLogic tells you it's not a valid regex, and it looks right to do so. It's not clear w

Re: [MarkLogic Dev General] Why does fn:replace gives an error when second argument exceeds certain length

2016-08-22 Thread DK Singh
Hi John, You are giving the wrong parameters in the second argument of fn: replace , replace work on patterns or the and you are passing second argument as string, So I think for the second argument in fn: replace you will have to provide regex On Aug 22, 2016 3:34 PM, "Johan de Boer" wrote: I a

[MarkLogic Dev General] Why does fn:replace gives an error when second argument exceeds certain length

2016-08-22 Thread Johan de Boer
I am using MarkLogic release 8.0-4 and I get a problem with fn:replace if the second argument exceeds a certain length. I use the following script in XQuery. This is just a simple query with the only goal to show the error. let $string1 := "" let $string2 := "" let $length-1 := 1463 let