Re: [MarkLogic Dev General] code reference across db's.
Hi Santhosh, Yes you can reference the modules in different data base when you use one of the below functions. In options parameter, you can specify the modules database name. Xdmp:eval() Xdmp:spawn() Xdmp:span-function() Thanks & Regards, Santhosh Rajasekaran It is very easy to defeat someone, but it is very hard to win someone. From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Kanugovi, Santhosh Sent: Thursday, March 22, 2018 2:48 PM To: general@developer.marklogic.com Subject: [MarkLogic Dev General] code reference across db's. Hello Can we share reference between different modules-databases. For example I have A module db "Library" and a module db "Order-Application" Can we reference a module from Library in Order-Application? Thank you. Santhosh Kanugovi Legal Markets and Innovation Legal & Regulatory Solutions U.S. Wolters Kluwer Office: 847-267-7027 [cid:image002.png@01D1B762.314D90E0] This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored. ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
[MarkLogic Dev General] Jenkins integration with Marklogic roxy deployer framework
Hi All, We are using roxy deployer to deploy code / modules to MarkLogic server. We are planning to integrate Jenkins for the deployment process. Can you please let us know the steps or process of integrating roxy project and deployment via Jenkins. Regards, Santhosh This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored. ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
Re: [MarkLogic Dev General] Custom JSON objects
Hi All, We are trying to convert json to xml. But some of our json key contains "/" character in it. Due to which the transformation (json:transform-from-json()) is failing with invalid lexical. Is there any other option to transform such json. Is there any other method / custom code to do the transformation to resolve this issue. Error: XDMP-QNAMELEXFORM: fn:QName("", "entities/0C4kKs7/attributes/CountryOfOrigin") -- Invalid lexical form for Qname Xquery: import module namespace json="http://marklogic.com/xdmp/json; at "/MarkLogic/json/json.xqy"; let $custom := json:config("custom") let $transform := json:transform-from-json(' { "crosswalks": [ { "uri": "entities/0C4kKs7/crosswalks/1T5YWYSh", "type": "configuration/sources/Reltio", "value": "0C4kKs7", "reltioLoadDate": "2016-02-19T01:01:42.324Z", "createDate": "2016-02-02T12:48:43.627Z", "updateDate": "2016-02-02T12:48:43.627Z", "attributes": [ "entities/0C4kKs7/attributes/CountryOfOrigin", "entities/0C4kKs7/attributes/IsVoid/BaNdOmc", "entities/0C4kKs7/attributes/CountryOfOrigin/OaZKd0G", "entities/0C4kKs7/attributes/OriginalReleaseYear/1T5YWLfv", "entities/0C4kKs7/attributes/MPMNumber/1T5YW0Md", "entities/0C4kKs7/attributes/Identifiers/1T5YW8t9/ID/1T5YWHPf", "entities/0C4kKs7/attributes/BoxOffice/1T5YWPwB/DomesticBoxOffice/1T5YWUCR", "entities/0C4kKs7/attributes/OriginalMadeFor/1QDXr7WM", "entities/0C4kKs7/attributes/BoxOffice/1T5YWPwB", "entities/0C4kKs7/attributes/Type/1QDXqqTK", "entities/0C4kKs7/attributes/LibraryTitle/1T5YW4ct", "entities/0C4kKs7/attributes/CountryOfOrigin/OaZI9Yy", "entities/0C4kKs7/attributes/Identifiers/1T5YW8t9/Type/1T5YWD9P", "entities/0C4kKs7/attributes/Identifiers/1T5YW8t9" ], "singleAttributeUpdateDates": { "entities/0C4kKs7/attributes/CountryOfOrigin": "2016-02-02T12:49:49.539Z", "entities/0C4kKs7/attributes/IsVoid/BaNdOmc": "2016-02-19T01:01:42.324Z", "entities/0C4kKs7/attributes/CountryOfOrigin/OaZKd0G": "2016-02-02T13:01:51.933Z", "entities/0C4kKs7/attributes/OriginalMadeFor/1QDXr7WM": "2016-02-02T12:50:57.215Z", "entities/0C4kKs7/attributes/Type/1QDXqqTK": "2016-02-02T12:49:09.023Z", "entities/0C4kKs7/attributes/CountryOfOrigin/OaZI9Yy": "2016-02-02T12:49:34.433Z" } } ] } ', $custom) return $transform Thanks & Regards, Santhosh This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored. ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
Re: [MarkLogic Dev General] Configuring SSL / https for appserver - reg.,
Hi Geert / Team, I have followed the below steps as mentioned in the documentation to make the http app server as https (SSL connection). We are trying to configure https connection newly in that app server. 1. Created a new Certificate Template eg: (WB-Authentication-template) 2. Assigned the newly created template to the http App server. 3. Now https connection works for the app server. 4. We see a marklogic temporary certificate generated with validity of one year in the status tab of the Certificate Template page. 5. Requested for the certificate and downloaded the csr(certificate request) and shared for signing to a certificate authority(COMODO Authority). But the certificate authority is saying that the csr request is invalid? Can you please assist, are we missing anything here. Questions: 1. Can we provide any name for the template? (or) we need to give the certificate authority name as template name? 2.Is there any specific list of certificate authority to get our ( custom / temporary ) certificate to get signed? 3. We are trying to get it signed from COMODO - certificate authority, they are saying our Marklogic Generated csr (certificate request) is invalid. 4. Can you please provide the values for the below field to use, for creating new temporary certificate. [cid:image001.png@01D0A1E1.6D037100] Thanks Regards, Santhosh WB MarkLogic Application Support Mobile:+91-9600025142 | VNET: 468645 Make it before, otherwise Better Late than Never. From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Friday, June 05, 2015 2:10 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Configuring SSL / https for appserver - reg., Hi Santhosh, If you created a template yourself, you should be able to go to the status of that template, and use the import button there to upload the certificate. Cheers, Geert From: santhosh.rajasekar...@cognizant.commailto:santhosh.rajasekar...@cognizant.com santhosh.rajasekar...@cognizant.commailto:santhosh.rajasekar...@cognizant.com Reply-To: MarkLogic Developer Discussion general@developer.marklogic.commailto:general@developer.marklogic.com Date: Friday, June 5, 2015 at 10:22 AM To: general@developer.marklogic.commailto:general@developer.marklogic.com general@developer.marklogic.commailto:general@developer.marklogic.com Subject: [MarkLogic Dev General] Configuring SSL / https for appserver - reg., Hi Team, We have to configure one of our Appserver in ML to access it via https. We have a certificate obtained from a certificate authority(COMODO CA Limited). I have to use this certificate for my Appserver to make it work as https. I tried to follow the steps in the documentation, it didn't work out. Marklogic Version : 7.0-5 Can you please let us know hot configure the SSL in appserver / use my certificate. How the certificate template is mapped to the certificate Authority? I have created a certificate template, how do I map my certificate to the template, I tried to import via the import tab in the template page, still it didn't map. Please suggest. Thanks Regards, Santhosh This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored. This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored. ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
[MarkLogic Dev General] SSL configuration in Marklogic -reg.,
Hi Team, We are trying to setup SSL (https) connection on the Marklogic App server. We followed below steps: Create a certificate template (eg: WB-Authentication-template) Enable SSL for the App Server Generate a certificate request and send it off to a certificate authority for signing. The certificate request is a zip file(requests) containing *.csr file. Questions: 1. Can we give any name for the template? (or) We need to give the certificate signing Authority company name as template name? 2. When we try to get it signed by COMODO authority, they are saying the certificate request is invalid? 3. Do we need to get it signed from any specific predefined Authorities? (or) We can do certificate signing with any authorities? Please suggest the process to setup SSL. Are we missing something here? Please Suggest. Regards, Santhosh Rajasekaran This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored. ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
[MarkLogic Dev General] Configuring SSL / https for appserver - reg.,
Hi Team, We have to configure one of our Appserver in ML to access it via https. We have a certificate obtained from a certificate authority(COMODO CA Limited). I have to use this certificate for my Appserver to make it work as https. I tried to follow the steps in the documentation, it didn't work out. Marklogic Version : 7.0-5 Can you please let us know hot configure the SSL in appserver / use my certificate. How the certificate template is mapped to the certificate Authority? I have created a certificate template, how do I map my certificate to the template, I tried to import via the import tab in the template page, still it didn't map. Please suggest. Thanks Regards, Santhosh This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored. ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
Re: [MarkLogic Dev General] Roxy bootstrap command throwing 404 - Not Found error - reg.,
Hi Team, We are using roxy deployer, I am getting 404- Not Found error when executing bootstrap command. Command: ml qa bootstrap Same thing is working in DEV environment, ml dev bootstrap is working fine. To deploy the code in QA environment, I have created new properties file qa.properties and provided the value for qa-server in the build.properties file. Please suggest. Error Message: D:\wbworkspace\authentication-servicesml qa bootstrap Bootstrapping your project into MarkLogic 7 on 10.134.125.138... Password for admin user: ERROR: 404 Not Found ERROR: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; htmlhead/bodycenterh1pSystem Error has occurred/p/h1/centerdiv style=padding-left: 50px;div style=padding-left: 25p x;bResponse Code:/bbr/div style=padding-left: 25px;404 Not Found/divbInformation:/bbr/div style=padding-left: 25px;/ /divbr/div style=padding-left: 25px;bStack Trace:/bbr/div style=padding-left: 25px;//div/div/body/html Thanks Regards, Santhosh This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored. ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
Re: [MarkLogic Dev General] How to add CDATA to xml content - reg.,
Hi Mary, Thanks for your response, but even after adding the prolog, the CDATA is not added to the elements. When we view the result xml, ![CDATA[ ]] is not visible to the text or p element. I tried to use xslt transformation to add the CDATA to the xml file. When we use the xslt to some XML structure, it is working fine. But when we wrap the xslt transformed content within some element, then the CDATA is wiping off (or it is invisible). Note: Our xquery module where we are trying to add the prolog / xslt is a library module, will it cause any impact of CDATA if we use in main / library module. Please suggest. Note: we have specified to add the CDATA to all the p tag as highlighted below. XSLT Approach: (XSLT without wrapper element) let $xslt := xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=2.0 xsl:output method=xml cdata-section-elements=p/ xsl:template match=@*|node() xsl:copy xsl:apply-templates select=@*|node()/ /xsl:copy /xsl:template /xsl:stylesheet let $outputNode := description typeproduct_description/type text pPokemon the Movie:/p /text /description return xdmp:xslt-eval($xslt, $outputNode)/element() Output: description typeproduct_description/type text p![CDATA[Pokemon the Movie:]]/p /text /description XSLT Approach: (XSLT with wrapper element descriptiveText) let $xslt := xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=2.0 xsl:output method=xml cdata-section-elements=p/ xsl:template match=@*|node() xsl:copy xsl:apply-templates select=@*|node()/ /xsl:copy /xsl:template /xsl:stylesheet let $outputNode := description typeproduct_description/type text pPokemon the Movie:/p /text /description return descriptiveText{ xdmp:xslt-eval($xslt, $outputNode)/element() }/descriptiveText Output: descriptiveText description typeproduct_description/type text pPokemon the Movie:/p /text /description /descriptiveText Thanks Regards, Santhosh WB MarkLogic Application Support Mobile:+91-9600025142 | VNET: 468645 -Original Message- From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Mary Holstege Sent: Tuesday, May 05, 2015 7:11 PM To: general@developer.marklogic.com Subject: Re: [MarkLogic Dev General] How to add CDATA to xml content - reg., If you really want CDATA escaping for certain elements, you can use the output options to control this. See https://docs.marklogic.com/guide/app-dev/appserver-control#id_86940 for how to set output options at the appserver level and https://docs.marklogic.com/guide/xquery/langoverview#id_71572 for how to do so on a query by query level using prolog options. In your case, putting this at the top of your query should do it: declare option xdmp:output cdata-section-elements=text; Note, however, that testing this via QConsole won't be effective, because of the way QConsole works, its own serialization options will win out. //Mary On 05/05/2015 04:42 AM, Florent Georges wrote: Hi, First I guess your question has nothing to do with the email you quote. You need to ask the question why you need CDATA. You most likely do not. Why is the following result not good for you? textlt;pgt;Sample content of a P element.lt;/pgt;/text Regards, ___ General mailing list General@developer.marklogic.commailto:General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored. ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
[MarkLogic Dev General] How to add CDATA to xml content - reg.,
Hi All, We need to add CDATA to our xml content. We followed below approach to add CDATA. But the out is coming as serialized xml, It is transforming the “” to “lt;” and “” to “gt;” Is there any option to get the output xml without the transformation. Code snippet to add the CDATA: text { fn:concat('![CDATA[', xdmp:quote( p{ $description }/p ), ']]') } /text Current Issue: description typeproduct_description/type textlt;![CDATA[lt;pgt;Sample cdata content within para tag.lt;/pgt;lt;pgt;Deep in the heart of a mysterious forest, a Pokemon named Shaymin stumbles into the midst of a battle between two powerful Pokemon, Dialga and Giratina. lt;/pgt;]]gt; /text /description Essentially we need to get rid of this entities and create simple elements like this below. description typeproduct_description/type text ![CDATA[p Sample cdata content within para tag./ppDeep in the heart of a mysterious forest, a Pokemon named Shaymin stumbles into the midst of a battle between two powerful Pokemon, Dialga and Giratina. /p]] /text /description Thanks Regards, Santhosh From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Asitmohan Nautiyal Sent: Tuesday, May 05, 2015 11:49 AM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Dynamic order by Hi Pragya, As per your requirement , you have to use if/else condition. Follow the below sample algo: for $each in $results//results/result (: $results//results/result == used // äs you mentioned AgreementType can be at any level or not :) return if($each/AgreementType) then if($sortDirection=asc) then order by $each/AgreementType ascending else order by $each/AgreementType descending else $results Now you can write own logic based on business conditions. Regards, Asit Nautiyal From: general-boun...@developer.marklogic.commailto:general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Kapoor, Pragya [pkapo...@innodata.com] Sent: Tuesday, May 05, 2015 9:34 AM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Dynamic order by Could someone help on this? From: Kapoor, Pragya Sent: Monday, May 4, 2015 5:03 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Dynamic order by Thanks Asit. But I have different requirement. In your code : return if($sorting/sorting/sort) then for $each in $results//results/result order by $each/AgreementType descending , $each/CollectionNo ascending return $each (: modify as per your business requirement :) else $results In the order by clause you are using $each/AgreementType, but as mentioned in the mail the element AgreementType is not static. This value is dynamic moreover sort direction(asc/desc) is also dynamic. Thanks Pragya From: general-boun...@developer.marklogic.commailto:general-boun...@developer.marklogic.com general-boun...@developer.marklogic.commailto:general-boun...@developer.marklogic.com on behalf of Asitmohan Nautiyal asitmoha...@hcl.commailto:asitmoha...@hcl.com Sent: Monday, May 4, 2015 4:40 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Dynamic order by Hi Pragya, try below sample code let $sorting :=a sorting columnAliasCurrency/columnAlias /sorting sorting sortdesc/sort columnAliasAgreementType/columnAlias /sorting sorting sortasc/sort columnAliasCollectionNo/columnAlias /sorting/a let $results := report columns titleCurrency/title titleAgreementType/title titleCollectionNo/title /columns results result CurrencyUS dollar/Currency AgreementTypeabc/AgreementType CollectionNo050/CollectionNo /result result CurrencyPound sterling/Currency AgreementTypexyz/AgreementType CollectionNo048/CollectionNo /result result CurrencyEuro/Currency AgreementTypeebf/AgreementType CollectionNo049/CollectionNo /result /results /report return if($sorting/sorting/sort) then for $each in $results//results/result order by $each/AgreementType descending , $each/CollectionNo ascending return $each (: modify as per your business requirement :) else $results Regards, Asit Nautiyal From: general-boun...@developer.marklogic.commailto:general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Kapoor, Pragya [pkapo...@innodata.com] Sent: Monday, May 04, 2015 3:21 PM To: MarkLogic Developer Discussion Subject: [MarkLogic Dev General] Dynamic order by Hi, I need to sort the $results based on element columnAlias in $sorting. for eg : In the below scenario, I want to first sort the $results with
Re: [MarkLogic Dev General] Minutely scheduled job is executing more than once within a minute - reg.,
HI Jason, Thanks for your reply, Yes we have update operation within the job. Some node-replace, some spawn, which internally update some records like that. Is there any option , to specify not to restart. We have try catch for the job statements, will that not help How to avoid this scenario? Thanks Regards, Santhosh From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Jason Hunter Sent: Monday, September 15, 2014 6:05 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Minutely scheduled job is executing more than once within a minute - reg., Since you say this happens under load, I'm going to guess you're doing an update in the job? If there's a potential deadlock detected in the locks then MarkLogic will restart one of the statements to avoid the deadlock. That would cause the log line to be printed several times, even though the job only ran to completion once. -jh- On Sep 15, 2014, at 8:28 PM, santhosh.rajasekar...@cognizant.commailto:santhosh.rajasekar...@cognizant.com santhosh.rajasekar...@cognizant.commailto:santhosh.rajasekar...@cognizant.com wrote: Hi All, We have created a minutely scheduled job in Mark logic server. At the beginning of that scheduled module, we are printing a log message. Log Message: Start of minutely scheduled task. We have noticed that this log is printed (2 to 4 times) within a minute very frequently in the log. As it is a minutely job, it should be executed only once per minute. Note: This repeated execution within a minute is happening , when the task server is loaded with other tasks to process. Otherwise it is executing / printing only once. We tried to change the priority of that scheduled task to higher priority, it didn't help. Can somebody say why it is behaving like this? Please suggest. Marklogic Server Version: 6.0-5.3 Hosts in Cluster : 3 Thanks Regards, Santhosh This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored. ___ General mailing list General@developer.marklogic.commailto:General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored. ___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general
Re: [MarkLogic Dev General] XQuery processing time
HI Chauhan, You can use path range index and path range query. And try to compare the results. Create path range index with path : /transaction/*/@transInfoRef Cts:search( /transaction/*, Cts:path-range-query(/transaction/*/@transInfoRef, =, ti1) ) Thanks Regards, santhosh From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Kunal Chauhan Sent: Tuesday, August 19, 2014 2:04 PM To: MarkLogic Developer Discussion Subject: [MarkLogic Dev General] XQuery processing time Hello, I am evaluting MarkLogic for XML based application. I split 1.1GB xml file into small pieces of xmls (1000 elements each). Below is MarkLogic server configuration. I have turned on following indexing word searches, word positions, fast phrase searches, fast case sensitive searches, fast diacritic sensitive searches, fast element word searches, element word positions, fast element phrase searches, element value positions, attribute value positions, field value searches, field value positions, fast element character searches, uri lexicon remaining all the values are default. Below is machine configuration. Linux machine having 8 cores and 64 GB RAM. I set max memory for MarkLogic is 32GB (Xmx32g). My XML file is look like this. transaction traInfo id=ti1 date01-01-2014/date sourcebank1/source /traInfo traInfo id=ti2 date01-01-2014/date sourcebank2/source /traInfo traInfo id=ti3 date01-01-2014/date sourcebank3/source /traInfo income transInfoRef=ti11000/income assets transInfoRef=ti11000/assets liablity transInfoRef=ti11000/liablity grossprofit transInfoRef=ti11000/grossprofit income transInfoRef=ti21000/income assets transInfoRef=ti21000/assets liablity transInfoRef=ti21000/liablity grossprofit transInfoRef=ti21000/grossprofit income transInfoRef=ti31000/income assets transInfoRef=ti31000/assets liablity transInfoRef=ti31000/liablity grossprofit transInfoRef=ti31000/grossprofit /transaction I fired following query. /transaction/*[@transInfoRef='ti1'] I fired above query in Marklogic, it took 48secs. The Same query I fired in BaseX with Attribute indexing On and got output in mili seconds. is this the best possible result I can achieve with MarkLogic ? Or can anyone help in tuning the MarkLogic database. Thanks, -- Kunal Chauhan mail...@gmail.commailto:mail...@gmail.com [+918655517141] This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored. ___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general
Re: [MarkLogic Dev General] Unsubscribe from this site
Hi Jyothi, You have to deregister from the mailing list for that. You will get a mail hopefully everymonth, whether you want to continue or opt to stop. You can do that to stop. From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of jyothi_loh...@dell.com Sent: Thursday, March 27, 2014 9:06 AM To: General@developer.marklogic.com Subject: [MarkLogic Dev General] Unsubscribe from this site Dell - Internal Use - Confidential Hi All, Please do not send any more e-mails to my mail id. Thanks Regards, Jyothi Lohiya This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. ___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general
Re: [MarkLogic Dev General] Count the occurrences of highlighted text
Hi pragya, You can convert your term to either lower or upper case before adding it to your map, and during retrieval also convert to your appropriate case, it should solve your problem. Thanks Regards, Santhosh Rajasekaran, Think twice before you start programming or you will program twice before you start thinking. Vnet: 466749 ,Cell : +91 9600025142 Location : Chennai, MEPZ From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Pragya Kapoor Sent: Tuesday, October 01, 2013 10:35 AM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Count the occurrences of highlighted text Hi Erik, Thanks for the solution. But if the query is case-insensitive, then the map will not work. Any solution for that. Thanks Pragya From: general-boun...@developer.marklogic.commailto:general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Erik Hennum Sent: Friday, September 27, 2013 9:28 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Count the occurrences of highlighted text Hi, Pragya: The xdmp:set() call doesn't return the value. The following worked for me: let $terms := ('Google','data','company') let $query := cts:or-query( for $term in $terms return cts:word-query($term) ) let $counts := 0 return cts:highlight($doc,$query, ( xdmp:set($counts,$counts+1), hit count={$counts}{$cts:text}/hit ) ) If you want to count each term separately, you can use a map: let $terms := ('Google','data','company') let $counts := map:map() let $query := cts:or-query( for $term in $terms return ( map:put($counts,$term,0), cts:word-query($term) ) ) return cts:highlight($doc,$query, ( let $c := map:get($counts,$cts:text)+1 return ( map:put($counts,$cts:text,$c), hit count={$c}{$cts:text}/hit ) ) ) Hoping that's useful, Erik Hennum From: general-boun...@developer.marklogic.commailto:general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Pragya Kapoor [pragya_kap...@infosys.com] Sent: Thursday, September 26, 2013 10:06 PM To: general@developer.marklogic.commailto:general@developer.marklogic.com Subject: [MarkLogic Dev General] Count the occurrences of highlighted text Hi, I have to count the words which are highlighted in the document EG: Document has : Google Inc. is an American multinational corporation specializing in Internet-related services and products. These include search, cloud computing, software and online advertising technologies.[7] Most of its profits are derived from AdWords.[8][9] Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University. Together they own about 16 percent of its shares. They incorporated Google as a privately held company on September 4, 1998. An initial public offering followed on August 19, 2004. Its mission statement from the outset was to organize the world's information and make it universally accessible and useful,[10] and its unofficial slogan was Don't be evil.[11][12] In 2006 Google moved to headquarters in Mountain View, California, nicknamed the Googleplex. Rapid growth since incorporation has triggered a chain of products, acquisitions and partnerships beyond Google's core search engine. It offers online productivity software including email (Gmail), an office suite (Google Drive), and social networking (Google+). Desktop products include applications for web browsing, organizing and editing photos, and instant messaging. The company leads the development of the Android mobile operating system and the browser-only Chrome OS[13] for a specialized type of netbook known as a Chromebook. Google has moved increasingly into communications hardware: it partners with major electronics manufacturers in production of its high-end Nexus devices and acquired Motorola Mobility in May 2012.[14] In 2012, a fiber-optic infrastructure was installed in Kansas City to facilitate a Google Fiber broadband service.[15] The corporation has been estimated to run more than one million servers in data centers around the world[16] and to process over one billion search requests[17] and about 24 petabytes of user-generated data each day.[18][19][20][21] In December 2012 Alexa listed google.com as the most visited website in the world. Numerous Google sites in other languages figure in the top one hundred, as do several other Google-owned sites such as YouTube and Blogger.[22] Its market dominance has led to criticism over issues including copyright, censorship, and privacy.[23][24] Customized highlighting terms : Google,data,company Now I need to highlight these terms and also count there occurrences in the document So, the output should be like
[MarkLogic Dev General] Issue with Profilling - reg.,
Hi All, I was trying to do profiling for one of my function in my xquery module. Both profile button in CQ/Query Console , prof:report() function is not generating the profile report for that function. It is hanged up, I tried multiple times, and it didn't work out. But profiling is working and generating report for other functions / adhoc query. Note: The function which I am trying to profile has multiple internal calls to other module functions and there are multiple recursive function calls. Please suggest what could be the reason? When I tried xdmp:query-meter(), xdmp:elapsed-time(), they are working and giving PT20.319355S timings. Thanks Regards, Santhosh Rajasekaran, This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. ___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general
Re: [MarkLogic Dev General] Issue with Profilling - reg.,
Hi Ron, Thanks for you info, In my case the reason is not that, I am passing the argument to my function. And moreover, when I just execute via cq/query console it returns the result. Only problem is when I do profiling, same code it is taking long time, it does not return any profile report. It was hanging up for more than 30 minutes. (I was able to see the scrolling symbol/ loading symble in the browser) [cid:image001.png@01CEB631.764996B0] Whereas the same query with xdmp:elapsed-time(), return the result with elapsed time of PT20.319355S. Thanks Regards, Santhosh Rajasekaran, Think twice before you start programming or you will program twice before you start thinking. Vnet: 466749 ,Cell : +91 9600025142 Location : Chennai, MEPZ From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Ron Hitchens Sent: Friday, September 20, 2013 6:29 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Issue with Profilling - reg., If you mean that your function appears to never run at all, it may be because it never runs. When a function call mysteriously never runs, even though you know the call to it was reached, this is usually a side-effect of function mapping. If you declare a function argument that is typed as a singleton (one and only one value allowed) and you pass a sequence to that function, then the function is invoked once for each item in the sequence. If the sequence is empty, it has zero items and so the function is invoked zero times. For example: declare function foo ($blah as xs:string) { fn:concat (Hello , $blah) }; foo (()) In this code, the function foo() will never run. You can test this by disabling function mapping in your module by declaring the following option in the prolog of your module. With this, passing a null pointer will result in an exception in your code. declare option xdmp:mapping false; Hope that helps. --- Ron Hitchens {r...@overstory.co.ukmailto:r...@overstory.co.uk} +44 7879 358212 On Sep 20, 2013, at 10:17 AM, santhosh.rajasekar...@cognizant.commailto:santhosh.rajasekar...@cognizant.com wrote: Hi All, I was trying to do profiling for one of my function in my xquery module. Both profile button in CQ/Query Console , prof:report() function is not generating the profile report for that function. It is hanged up, I tried multiple times, and it didn't work out. But profiling is working and generating report for other functions / adhoc query. Note: The function which I am trying to profile has multiple internal calls to other module functions and there are multiple recursive function calls. Please suggest what could be the reason? When I tried xdmp:query-meter(), xdmp:elapsed-time(), they are working and giving PT20.319355S timings. Thanks Regards, Santhosh Rajasekaran, This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. ___ General mailing list General@developer.marklogic.commailto:General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. inline: image001.png___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general
Re: [MarkLogic Dev General] Issue with Profilling - reg.,
Hi Damon, Thanks for you quick reply, 1) Most of the times it never returns. It keeps on loading / executing. One time I got timed limit exceeded error. [cid:image001.png@01CEB631.764996B0] 2) When you say status on port 8001, are you referring to task server stats or App server status? In both cases I could not see anything in status page. Please let me know exactly which status should I look for. For you information, the function involves large data fetch. Is there any data limit for profiler? The elapsed time before code change, when I had profile generation issue is (PT20.306547S, PT20.082965S) FYI, After some performance improvement of the same function, now I was able to get the profile output. The elapsed time currently is (PT0.854151S, PT0.889512S) Thanks Regards, Santhosh Rajasekaran, Think twice before you start programming or you will program twice before you start thinking. Vnet: 466749 ,Cell : +91 9600025142 Location : Chennai, MEPZ From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Damon Feldman Sent: Friday, September 20, 2013 6:22 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Issue with Profilling - reg., Santhosh, When you say hanged up, is it that the function never returns (and is visible in the server status tabs on port 8001) or it returns but no output is displayed, or that it times out? I can see a few possibilities - one is that there is a bug in the profiler possibly related to deep recursion, another is that the profiler causes your function to run slower so it is taking too long, and a third is some error on your part. Can you isolate this to a reproducible test case that inserts some documents and then the profile hangs up? You can post that here or submit as a bug to MarkLogic. Yours, Damon From: general-boun...@developer.marklogic.commailto:general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of santhosh.rajasekar...@cognizant.commailto:santhosh.rajasekar...@cognizant.com Sent: Friday, September 20, 2013 5:17 AM To: general@developer.marklogic.commailto:general@developer.marklogic.com Subject: [MarkLogic Dev General] Issue with Profilling - reg., Hi All, I was trying to do profiling for one of my function in my xquery module. Both profile button in CQ/Query Console , prof:report() function is not generating the profile report for that function. It is hanged up, I tried multiple times, and it didn't work out. But profiling is working and generating report for other functions / adhoc query. Note: The function which I am trying to profile has multiple internal calls to other module functions and there are multiple recursive function calls. Please suggest what could be the reason? When I tried xdmp:query-meter(), xdmp:elapsed-time(), they are working and giving PT20.319355S timings. Thanks Regards, Santhosh Rajasekaran, This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. inline: image001.png___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general
Re: [MarkLogic Dev General] Script for ML Database Configuration
Hi Mohan, Your statement is little confusing, can you brief what you are trying to do? Thanks Regards, Santhosh Rajasekaran, “Think twice before you start programming or you will program twice before you start thinking.” From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Mohanraj Chozhan Sent: Monday, June 17, 2013 7:30 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Script for ML Database Configuration Thanks, In the same database shall we create the another database with the existing script. Is it possible From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of santhosh.rajasekar...@cognizant.com Sent: Monday, June 17, 2013 7:26 PM To: general@developer.marklogic.com Subject: Re: [MarkLogic Dev General] Script for ML Database Configuration Hi Mohan, You can export the configuration of a particular DB/ Appserver which is already present in ML via “Configuration Manager”, that will give you an xml containing all the config / index settings for that database/ Appserver. http://ip:8002/nav/?type=databaseshttp://%3cip%3e:8002/nav/?type=databases Note: provide correct ip of your ML server in the above url, there you can see the You can import it to any other environment. (You will get whole configuration of the DB/ Appserver) Hope this will help you. Thanks Regards, Santhosh Rajasekaran, “Think twice before you start programming or you will program twice before you start thinking.” Vnet: 466749 ,Cell : +91 9600025142 Location : Chennai, MEPZ From: general-boun...@developer.marklogic.commailto:general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Mohanraj Chozhan Sent: Monday, June 17, 2013 7:18 PM To: general@developer.marklogic.commailto:general@developer.marklogic.com Subject: [MarkLogic Dev General] Script for ML Database Configuration Hi, How to generate the ML Database Configuration Script for already present in ML. I need to total configuration scripts including index setup. Could you please help on this. Regards, Mohanraj CAUTION - Disclaimer * This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS End of Disclaimer INFOSYS*** This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. ___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general
[MarkLogic Dev General] Elapsed time in xdmp:query-meter() , Profile time is showing more difference (Why it is not same for same query)- reg.,
Hi All, Warm regards, I am trying to execute an xquery function which interanlly updates (insert child node) to 11 documents in the database. When i used query meter in my code, the total elapsed time is (PT0.081001S / PT0.111622S)as below in different execution. qm:elapsed-timePT0.081001S/qm:elapsed-time qm:elapsed-timePT0.111622S/qm:elapsed-time When i try to profile my query using CQ, (clikcing the profile button) The profiled time is PT1M55.063478S Eg: Profiled 2046 expressions in PT1M55.063478S Why the time difference is high, Does profiling do some extra operation to calculate the timing?(does it include data merge / query parsing / indexing time also? ) Now in this case which time should i consider as execution time for my xquery funcation? Elapsed time / profile time. Thanks Regards, Santhosh Thanks Regards, Santhosh Rajasekaran, Think twice before you start programming or you will program twice before you start thinking. This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. ___ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general