Re: [MarkLogic Dev General] reg: Forest replica configuration
Hi, I tried removing the replica from the master forest and assigned the replica again. But it’s still in wait replicating mount state with Mount State wait replication since June 21, 2017 11:36:12 AM Mount State Detail deferring to forest CondeNastDAM-Modules-Forest-1 Thanks, Bharathi K From: kirti singh [mailto:mail2kirt...@gmail.com] Sent: Wednesday, June 21, 2017 8:48 PM To: Karunanithi, Bharathi Subject: Re: [MarkLogic Dev General] reg: Forest replica configuration Hi, Can you trying detaching replica forest and attaching it again ? Please ensure that this will move data from master to replica forest. Thanks Kirti On Jun 21, 2017 5:10 PM, "Karunanithi, Bharathi" <bharathi_karunani...@condenast.com<mailto:bharathi_karunani...@condenast.com>> wrote: Hi Team, We are having 3 hosts in our application cluster. The data is split among these 3 hosts and made it has replica in atleast one other host. I have configured the forests to be the master and the replica set as given below: [cid:image001.png@01D2EAD2.E6140870] As can be seen, the forests are in wait replication state with reason to be “not yet sure who is master“. Please let me know how to make them sync replicating. I have tried restarting the forests but they are not syncing to its master. Thanks, Bharathi K ___ General mailing list General@developer.marklogic.com<mailto:General@developer.marklogic.com> Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general<http://secure-web.cisco.com/1sd6VrJD9KIVoBibWPPRM5ITN1cepD1E1K2hfXWSroPL6hxAzoEYqoe552HQEKHpA8YKNW5QBlsdmxnQgag5fizpaXxDq-NwAYMSjZ2fy51CnG1S4RxI1hlJb7gM1X5CbuZT8sy2zP84_8GV4k5RGUJyL_acak8cGE6tcB_VZzDUdEywH4sTCQKIy4qsuXOOYNtFdct_FTIqHp6VATGcPxOKDeBKGXS_RHvrNspPOFoISEcFj81vhU1CdjTQVALIH/http%3A%2F%2Fdeveloper.marklogic.com%2Fmailman%2Flistinfo%2Fgeneral> ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
[MarkLogic Dev General] reg: Forest replica configuration
Hi Team, We are having 3 hosts in our application cluster. The data is split among these 3 hosts and made it has replica in atleast one other host. I have configured the forests to be the master and the replica set as given below: [cid:image001.png@01D2EACE.2BE0EFD0] As can be seen, the forests are in wait replication state with reason to be "not yet sure who is master". Please let me know how to make them sync replicating. I have tried restarting the forests but they are not syncing to its master. Thanks, Bharathi K ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
Re: [MarkLogic Dev General] Schema validation fails for certain XMLs #CGO#
Any updates please! From: Karunanithi, Bharathi Sent: Thursday, May 25, 2017 8:27 PM To: MarkLogic Developer Discussion Subject: RE: [MarkLogic Dev General] Schema validation fails for certain XMLs #CGO# I am sure this is not because of the LAX validation. The element structure gets modified and Marklogic 8.0-6.4 adds clear attribute to tags and also other HTML5 deprecated tags to other elements such as etc.,. This happens only while reading the document using xdmp:document-get from shared location / filesystem. The same call does not add any unused attributes to the elements in previous versions. let $path:= "//swcnpny048/2017/Print/Lucky/20170306/XML/GW201703_11_11.xml" let $content := xdmp:document-get($path) When you insert the document to the database and read it by fn:doc, this problem does not occur. I guess there is some parsing issues that adds the new attributes to the documents when you try to read the xml using xdmp:document-get. I tested in other ML versions: ML5 ML 8.0-5.8 ML 8.0-4 This issue is not occurring. I don't want to pick up any default XHTML attributes when we read an xml from a location, maintaining the structure as it is in the source location. Is there any way to do this? Appreciating your help. Thanks in Advance! From: general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Jain, Abhishek Sent: Wednesday, May 24, 2017 5:15 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Schema validation fails for certain XMLs #CGO# Hi Bharathi, It's not a solution but will help in getting around a solution. I think proper understanding of lax and Strict will help here. I think for any new element (in your case its ) Validation will obviously fail if it doesn't comply with XSDs. https://msdn.microsoft.com/en-us/library/dd297062.aspx Thanks and Regards, Abhishek Jain From: general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Karunanithi, Bharathi Sent: Wednesday, May 24, 2017 4:58 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Schema validation fails for certain XMLs Can I please get any help on the below issue? From: general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Karunanithi, Bharathi Sent: Tuesday, May 23, 2017 5:20 PM To: MarkLogic Developer Discussion Subject: [MarkLogic Dev General] Schema validation fails for certain XMLs Hi Team, I am getting the following validation error in MarkLogic 8.0-6.4 hosted on a AWS EC2 instance. But certain xml files fails the validation against the Schema particularly in this environment alone. Same XML passes the validation in other ML environments and also from other standalone validation tools using Schemas. The used Schema files are attached in Zip format. Major Schema file being pam.xsd from the zip. Sample XML for which the error is occurring and the error are also attached with this email. Error: Please note that this error only occurs for a xml with a line break tags( or ). XML files without any line breaks are passing the Schema Validation. XDMP-VALIDATEUNEXPECTED: (err:XQDY0027) validate lax { $n } -- Invalid node: Found @clear but expected (@title? & @class? & @id?) at fn:doc("//swcnpny048/2017/Print/Lucky/20170306/XML/GW201703_11_11.xml")/pam:message/pam:article/pam-xhtml:body/pam-xhtml:h1/pam-xhtml:br/@clear using schema "pam.xsd" Script: import module namespace validate = "http://condenast.com/dam/2.0/lib/validation; at "/application/lib/validation-lib.xqy"; import module namespace mapping = "http://condenast.com/dam/2.0/lib/mapping; at "/application/lib/mapping-lib.xqy"; import module namespace util = "http://condenast.com/dam/2.0/lib/validation-utils; at "/application/lib/validation-utils.xqy"; declare namespace cndam = "http://condenast.com/dam/2.0;; let $path:= "//swcnpny048/2017/Print/Lucky/20170306/XML/GW201703_11_11.xml" let $assetType:= mapping:get-asset-type-by-extension($path) let $content := xdmp:document-get($path) let $schema := validate:get-schema-from-asset-type($assetType) let $results := util:validate-with-schema( $content, $schema/cndam:namespace/text(), $schema/cndam:schemaLocation/text() ) return $results Please tell me if I am missing any configurations? Or any? Thanks, Bharathi K This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, r
Re: [MarkLogic Dev General] Schema validation fails for certain XMLs #CGO#
I am sure this is not because of the LAX validation. The element structure gets modified and Marklogic 8.0-6.4 adds clear attribute to tags and also other HTML5 deprecated tags to other elements such as etc.,. This happens only while reading the document using xdmp:document-get from shared location / filesystem. The same call does not add any unused attributes to the elements in previous versions. let $path:= "//swcnpny048/2017/Print/Lucky/20170306/XML/GW201703_11_11.xml" let $content := xdmp:document-get($path) When you insert the document to the database and read it by fn:doc, this problem does not occur. I guess there is some parsing issues that adds the new attributes to the documents when you try to read the xml using xdmp:document-get. I tested in other ML versions: ML5 ML 8.0-5.8 ML 8.0-4 This issue is not occurring. I don't want to pick up any default XHTML attributes when we read an xml from a location, maintaining the structure as it is in the source location. Is there any way to do this? Appreciating your help. Thanks in Advance! From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Jain, Abhishek Sent: Wednesday, May 24, 2017 5:15 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Schema validation fails for certain XMLs #CGO# Hi Bharathi, It's not a solution but will help in getting around a solution. I think proper understanding of lax and Strict will help here. I think for any new element (in your case its ) Validation will obviously fail if it doesn't comply with XSDs. https://msdn.microsoft.com/en-us/library/dd297062.aspx Thanks and Regards, Abhishek Jain From: general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Karunanithi, Bharathi Sent: Wednesday, May 24, 2017 4:58 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Schema validation fails for certain XMLs Can I please get any help on the below issue? From: general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Karunanithi, Bharathi Sent: Tuesday, May 23, 2017 5:20 PM To: MarkLogic Developer Discussion Subject: [MarkLogic Dev General] Schema validation fails for certain XMLs Hi Team, I am getting the following validation error in MarkLogic 8.0-6.4 hosted on a AWS EC2 instance. But certain xml files fails the validation against the Schema particularly in this environment alone. Same XML passes the validation in other ML environments and also from other standalone validation tools using Schemas. The used Schema files are attached in Zip format. Major Schema file being pam.xsd from the zip. Sample XML for which the error is occurring and the error are also attached with this email. Error: Please note that this error only occurs for a xml with a line break tags( or ). XML files without any line breaks are passing the Schema Validation. XDMP-VALIDATEUNEXPECTED: (err:XQDY0027) validate lax { $n } -- Invalid node: Found @clear but expected (@title? & @class? & @id?) at fn:doc("//swcnpny048/2017/Print/Lucky/20170306/XML/GW201703_11_11.xml")/pam:message/pam:article/pam-xhtml:body/pam-xhtml:h1/pam-xhtml:br/@clear using schema "pam.xsd" Script: import module namespace validate = "http://condenast.com/dam/2.0/lib/validation; at "/application/lib/validation-lib.xqy"; import module namespace mapping = "http://condenast.com/dam/2.0/lib/mapping; at "/application/lib/mapping-lib.xqy"; import module namespace util = "http://condenast.com/dam/2.0/lib/validation-utils; at "/application/lib/validation-utils.xqy"; declare namespace cndam = "http://condenast.com/dam/2.0;; let $path:= "//swcnpny048/2017/Print/Lucky/20170306/XML/GW201703_11_11.xml" let $assetType:= mapping:get-asset-type-by-extension($path) let $content := xdmp:document-get($path) let $schema := validate:get-schema-from-asset-type($assetType) let $results := util:validate-with-schema( $content, $schema/cndam:namespace/text(), $schema/cndam:schemaLocation/text() ) return $results Please tell me if I am missing any configurations? Or any? Thanks, Bharathi K This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. ___ General mailing list
Re: [MarkLogic Dev General] Unable to select forests to recover
It is not a clustered environment where I am trying to do the recover. The only difference is that the target MarkLogic is hosted on an AWS-EC2 instance and trying to dump the data onto the mounted drives. Please let us know if there is any other config changes we need to do. Also tried doing a recover in another machine(which is not in AWS), the data recovers fine with the same backed-up directory. Please correct me if I am missing anything here. From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Ranvir Singh Sent: Friday, April 28, 2017 3:07 PM To: MarkLogic Developer Discussion Cc: Vasiadis, Demetrios Subject: Re: [MarkLogic Dev General] Unable to select forests to recover if this is a clustered environment, check if the backup drive is mounted on all the servers where there are forests. For instance Server A having forest 01, 02, the backup drive should be mounted on that server. Server B having forest 03, 04, the backup drive should be mounted on that server too. On Fri, Apr 28, 2017 at 1:06 PM, Karunanithi, Bharathi <bharathi_karunani...@condenast.com<mailto:bharathi_karunani...@condenast.com>> wrote: Those are all with the same name as that of the back-ups. From: general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com> [mailto:general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>] On Behalf Of Ranvir Singh Sent: Friday, April 28, 2017 8:42 AM To: MarkLogic Developer Discussion Cc: Vasiadis, Demetrios Subject: Re: [MarkLogic Dev General] Unable to select forests to recover Hi Karunanithi, Please check if the database has all these forests with same name, if not you need to create them having the same name as present in backup. Thanks, Ranvir On Fri, Apr 28, 2017 at 12:35 AM, Karunanithi, Bharathi <bharathi_karunani...@condenast.com<mailto:bharathi_karunani...@condenast.com>> wrote: Hi Team, We are trying to do a database restore from a directory as given below, But unable to select the forests: Appreciating your help to resolve this in MarkLogic 8.0.6.4. Please find below the screen shots. [cid:image001.png@01D2C04A.AB3D2630] [cid:image002.jpg@01D2C04A.AB3D2630] ___ General mailing list General@developer.marklogic.com<mailto:General@developer.marklogic.com> Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general -- Thanks & Best Regards, Ranvir Singh | LinkedIn : in.linkedin.com/in/singhranvir/<http://in.linkedin.com/in/singhranvir/> ___ General mailing list General@developer.marklogic.com<mailto:General@developer.marklogic.com> Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general -- Thanks & Best Regards, Ranvir Singh | LinkedIn : in.linkedin.com/in/singhranvir/<http://in.linkedin.com/in/singhranvir/> ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
Re: [MarkLogic Dev General] Unable to select forests to recover
Still facing the same problem, not able to select the forests to restore. From: Karunanithi, Bharathi Sent: Friday, April 28, 2017 1:02 PM To: MarkLogic Developer Discussion Cc: Vasiadis, Demetrios Subject: RE: [MarkLogic Dev General] Unable to select forests to recover Those are all with the same name as that of the back-ups. From: general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Ranvir Singh Sent: Friday, April 28, 2017 8:42 AM To: MarkLogic Developer Discussion Cc: Vasiadis, Demetrios Subject: Re: [MarkLogic Dev General] Unable to select forests to recover Hi Karunanithi, Please check if the database has all these forests with same name, if not you need to create them having the same name as present in backup. Thanks, Ranvir On Fri, Apr 28, 2017 at 12:35 AM, Karunanithi, Bharathi <bharathi_karunani...@condenast.com<mailto:bharathi_karunani...@condenast.com>> wrote: Hi Team, We are trying to do a database restore from a directory as given below, But unable to select the forests: Appreciating your help to resolve this in MarkLogic 8.0.6.4. Please find below the screen shots. [cid:image001.png@01D2C01F.AC7EB570] [cid:image002.jpg@01D2C01F.AC7EB570] ___ General mailing list General@developer.marklogic.com<mailto:General@developer.marklogic.com> Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general -- Thanks & Best Regards, Ranvir Singh | LinkedIn : in.linkedin.com/in/singhranvir/<http://in.linkedin.com/in/singhranvir/> ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
Re: [MarkLogic Dev General] Unable to select forests to recover
Those are all with the same name as that of the back-ups. From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Ranvir Singh Sent: Friday, April 28, 2017 8:42 AM To: MarkLogic Developer Discussion Cc: Vasiadis, Demetrios Subject: Re: [MarkLogic Dev General] Unable to select forests to recover Hi Karunanithi, Please check if the database has all these forests with same name, if not you need to create them having the same name as present in backup. Thanks, Ranvir On Fri, Apr 28, 2017 at 12:35 AM, Karunanithi, Bharathi <bharathi_karunani...@condenast.com<mailto:bharathi_karunani...@condenast.com>> wrote: Hi Team, We are trying to do a database restore from a directory as given below, But unable to select the forests: Appreciating your help to resolve this in MarkLogic 8.0.6.4. Please find below the screen shots. [cid:image001.png@01D2C01F.94D434E0] [cid:image002.jpg@01D2C01F.94D434E0] ___ General mailing list General@developer.marklogic.com<mailto:General@developer.marklogic.com> Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general -- Thanks & Best Regards, Ranvir Singh | LinkedIn : in.linkedin.com/in/singhranvir/<http://in.linkedin.com/in/singhranvir/> ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
[MarkLogic Dev General] Unable to select forests to recover
Hi Team, We are trying to do a database restore from a directory as given below, But unable to select the forests: Appreciating your help to resolve this in MarkLogic 8.0.6.4. Please find below the screen shots. [cid:image001.png@01D2BFB6.EBC70ED0] [cid:image004.jpg@01D2BFB7.4F51FFA0] ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
Re: [MarkLogic Dev General] Re Question #2: MarkLogic 8 Query Parsing issues in search:search-Need Help
Okay Geert, We will discuss and reach out to you if an RFE is required from our end. From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Tuesday, November 15, 2016 6:39 PM To: MarkLogic Developer Discussion Cc: Vasiadis, Demetrios Subject: Re: [MarkLogic Dev General] Re Question #2: MarkLogic 8 Query Parsing issues in search:search-Need Help Sorry, I see no options. The return-query flag is tucked deep into the search lib. If you consider this a serious restriction, I'd advice reaching out via your MarkLogic support channels, and ask to get an RFE (Request for Enhancement) raised.. Cheers, Geert From: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of "Karunanithi, Bharathi" <bharathi_karunani...@condenast.com<mailto:bharathi_karunani...@condenast.com>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Tuesday, November 15, 2016 at 1:02 PM To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Cc: "Vasiadis, Demetrios" <demetrios_vasia...@condenast.com<mailto:demetrios_vasia...@condenast.com>> Subject: Re: [MarkLogic Dev General] Re Question #2: MarkLogic 8 Query Parsing issues in search:search-Need Help Thanks Geert. Yes, Now I am able to see the annotated query using "cts:annotated-query" option in search:parse. But I need this to be returned in search:search response when the flag is set to "true". But by default, this is returning a "cts-query" not the annotated query. So as you suggested , got the annotated query separately using the "cts:annotated-query" option in search:parse as highlighted below: {search:search($query, $options,0,1)} {search:parse($query, $options, "cts:annotated-query")} This again results in an extra step to get the annotated-query. Can we get an annotated-query in search:search response in a single step(results as well as the annotated query as a single response)? Thanks, Bharathi K From: general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Tuesday, November 15, 2016 1:16 AM To: MarkLogic Developer Discussion Cc: Vasiadis, Demetrios Subject: [MarkLogic Dev General] Re Question #2: MarkLogic 8 Query Parsing issues in search:search-Need Help Hi Bharathi, Regarding question #2, I think you refer to the cts:query annotations that where originally used for search:unparse. Search:unparse has been deprecated though (see http://docs.marklogic.com/search:unparse), hence the change in the default behavior of search:parse. You can still get the annotated cts:query by providing an extra flag. Just append , "cts:annotated-query" to the call to search:parse. See also the example shown in above link.. Cheers, Geert From: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of "Karunanithi, Bharathi" <bharathi_karunani...@condenast.com<mailto:bharathi_karunani...@condenast.com>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Monday, November 14, 2016 at 4:53 PM To: "general@developer.marklogic.com<mailto:general@developer.marklogic.com>" <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Cc: "Vasiadis, Demetrios" <demetrios_vasia...@condenast.com<mailto:demetrios_vasia...@condenast.com>> Subject: [MarkLogic Dev General] MarkLogic 8 Query Parsing issues in search:search-Need Help Hi Team, We are doing an Application migration from MarkLogic 5.0-5 to 8.0-4. In which we observe certain query parsing issues. Issue: We have been getting no results for the: query string: publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND regionName:"United States" AND source:"Pre-press" Some parameters returned are different between ML versions. Sample Query Snippet: import module namespace model = "http://condenast.com/dam/2.0/model/montrose; at "/application/model/montrose-model.xqy"; import module namespace search = "http://marklogic.com/appservices/search; at "/MarkLogic/appservices/search/search.xqy"; declare namespace cndam = "http://condenast.com/dam/2.0;; let $query := 'publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND regionName:"United States" AND source:"Pre-press"' return search:parse($query, model:b
Re: [MarkLogic Dev General] Re Question #1: MarkLogic 8 Query Parsing issues in search:search-Need Help
Thank you Geert for explaining , will add an extra constraint. From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Tuesday, November 15, 2016 6:33 PM To: MarkLogic Developer Discussion Cc: Vasiadis, Demetrios Subject: Re: [MarkLogic Dev General] Re Question #1: MarkLogic 8 Query Parsing issues in search:search-Need Help I think it was considered a bug in ML5. Using the extra constraint it should work the same in both ML5 and ML8.. Cheers, Geert From: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of "Karunanithi, Bharathi" <bharathi_karunani...@condenast.com<mailto:bharathi_karunani...@condenast.com>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Tuesday, November 15, 2016 at 12:53 PM To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Cc: "Vasiadis, Demetrios" <demetrios_vasia...@condenast.com<mailto:demetrios_vasia...@condenast.com>> Subject: Re: [MarkLogic Dev General] Re Question #1: MarkLogic 8 Query Parsing issues in search:search-Need Help Thanks Geert. Getting results and the query is parsed after adding the constraint for "source". But this seems to be working fine even when there is no constraint added for "source" in ML5. From: general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Tuesday, November 15, 2016 1:10 AM To: MarkLogic Developer Discussion Cc: Vasiadis, Demetrios Subject: [MarkLogic Dev General] Re Question #1: MarkLogic 8 Query Parsing issues in search:search-Need Help Hi Banrathi, Regarding question #1: try adding a word constraint named 'source': Cheers, Geert From: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of "Karunanithi, Bharathi" <bharathi_karunani...@condenast.com<mailto:bharathi_karunani...@condenast.com>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Monday, November 14, 2016 at 4:53 PM To: "general@developer.marklogic.com<mailto:general@developer.marklogic.com>" <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Cc: "Vasiadis, Demetrios" <demetrios_vasia...@condenast.com<mailto:demetrios_vasia...@condenast.com>> Subject: [MarkLogic Dev General] MarkLogic 8 Query Parsing issues in search:search-Need Help Hi Team, We are doing an Application migration from MarkLogic 5.0-5 to 8.0-4. In which we observe certain query parsing issues. Issue: We have been getting no results for the: query string: publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND regionName:"United States" AND source:"Pre-press" Some parameters returned are different between ML versions. Sample Query Snippet: import module namespace model = "http://condenast.com/dam/2.0/model/montrose; at "/application/model/montrose-model.xqy"; import module namespace search = "http://marklogic.com/appservices/search; at "/MarkLogic/appservices/search/search.xqy"; declare namespace cndam = "http://condenast.com/dam/2.0;; let $query := 'publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND regionName:"United States" AND source:"Pre-press"' return search:parse($query, model:build-all-options("Image")) Attaching the search options used.(please refer options.txt) ML5 result: http://marklogic.com/cts; xmlns:xs="http://www.w3.org/2001/XMLSchema;> http://condenast.com/dam/2.0;>_1:publicationName http://www.w3.org/2001/XMLSchema-instance;>Bon Appetit collation=http://marklogic.com/collation/codepoint<http://marklogic.com/collation/codepoint%3c/cts:option%3e> http://condenast.com/dam/2.0;>_1:coverDisplayDate October 2016 http://condenast.com/dam/2.0;>_1:region http://www.w3.org/2001/XMLSchema-instance;>United States collation=http://marklogic.com/collation/codepoint<http://marklogic.com/collation/codepoint%3c/cts:option%3e> Pre-press ML8 result: http://marklogic.com/cts;> http://condenast.com/dam/2.0;>_1:publicationName http://www.w3.org/2001/XMLSchema; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>Bon Appetit collation=http://marklogic.com/collation/codepoint<
Re: [MarkLogic Dev General] Re Question #2: MarkLogic 8 Query Parsing issues in search:search-Need Help
Thanks Geert. Yes, Now I am able to see the annotated query using "cts:annotated-query" option in search:parse. But I need this to be returned in search:search response when the flag is set to "true". But by default, this is returning a "cts-query" not the annotated query. So as you suggested , got the annotated query separately using the "cts:annotated-query" option in search:parse as highlighted below: {search:search($query, $options,0,1)} {search:parse($query, $options, "cts:annotated-query")} This again results in an extra step to get the annotated-query. Can we get an annotated-query in search:search response in a single step(results as well as the annotated query as a single response)? Thanks, Bharathi K From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Tuesday, November 15, 2016 1:16 AM To: MarkLogic Developer Discussion Cc: Vasiadis, Demetrios Subject: [MarkLogic Dev General] Re Question #2: MarkLogic 8 Query Parsing issues in search:search-Need Help Hi Bharathi, Regarding question #2, I think you refer to the cts:query annotations that where originally used for search:unparse. Search:unparse has been deprecated though (see http://docs.marklogic.com/search:unparse), hence the change in the default behavior of search:parse. You can still get the annotated cts:query by providing an extra flag. Just append , "cts:annotated-query" to the call to search:parse. See also the example shown in above link.. Cheers, Geert From: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of "Karunanithi, Bharathi" <bharathi_karunani...@condenast.com<mailto:bharathi_karunani...@condenast.com>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Monday, November 14, 2016 at 4:53 PM To: "general@developer.marklogic.com<mailto:general@developer.marklogic.com>" <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Cc: "Vasiadis, Demetrios" <demetrios_vasia...@condenast.com<mailto:demetrios_vasia...@condenast.com>> Subject: [MarkLogic Dev General] MarkLogic 8 Query Parsing issues in search:search-Need Help Hi Team, We are doing an Application migration from MarkLogic 5.0-5 to 8.0-4. In which we observe certain query parsing issues. Issue: We have been getting no results for the: query string: publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND regionName:"United States" AND source:"Pre-press" Some parameters returned are different between ML versions. Sample Query Snippet: import module namespace model = "http://condenast.com/dam/2.0/model/montrose; at "/application/model/montrose-model.xqy"; import module namespace search = "http://marklogic.com/appservices/search; at "/MarkLogic/appservices/search/search.xqy"; declare namespace cndam = "http://condenast.com/dam/2.0;; let $query := 'publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND regionName:"United States" AND source:"Pre-press"' return search:parse($query, model:build-all-options("Image")) Attaching the search options used.(please refer options.txt) ML5 result: http://marklogic.com/cts; xmlns:xs="http://www.w3.org/2001/XMLSchema;> http://condenast.com/dam/2.0;>_1:publicationName http://www.w3.org/2001/XMLSchema-instance;>Bon Appetit collation=http://marklogic.com/collation/codepoint<http://marklogic.com/collation/codepoint%3c/cts:option%3e> http://condenast.com/dam/2.0;>_1:coverDisplayDate October 2016 http://condenast.com/dam/2.0;>_1:region http://www.w3.org/2001/XMLSchema-instance;>United States collation=http://marklogic.com/collation/codepoint<http://marklogic.com/collation/codepoint%3c/cts:option%3e> Pre-press ML8 result: http://marklogic.com/cts;> http://condenast.com/dam/2.0;>_1:publicationName http://www.w3.org/2001/XMLSchema; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>Bon Appetit collation=http://marklogic.com/collation/codepoint<http://marklogic.com/collation/codepoint%3c/cts:option%3e> http://condenast.com/dam/2.0;>_1:coverDisplayDate October 2016 http://condenast.com/dam/2.0;>_1:region http://www.w3.org/2001/XMLSchema; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>United States collation=http://marklogic.com/collation/codepoint<
Re: [MarkLogic Dev General] Re Question #1: MarkLogic 8 Query Parsing issues in search:search-Need Help
Thanks Geert. Getting results and the query is parsed after adding the constraint for "source". But this seems to be working fine even when there is no constraint added for "source" in ML5. From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Tuesday, November 15, 2016 1:10 AM To: MarkLogic Developer Discussion Cc: Vasiadis, Demetrios Subject: [MarkLogic Dev General] Re Question #1: MarkLogic 8 Query Parsing issues in search:search-Need Help Hi Banrathi, Regarding question #1: try adding a word constraint named 'source': Cheers, Geert From: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of "Karunanithi, Bharathi" <bharathi_karunani...@condenast.com<mailto:bharathi_karunani...@condenast.com>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Monday, November 14, 2016 at 4:53 PM To: "general@developer.marklogic.com<mailto:general@developer.marklogic.com>" <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Cc: "Vasiadis, Demetrios" <demetrios_vasia...@condenast.com<mailto:demetrios_vasia...@condenast.com>> Subject: [MarkLogic Dev General] MarkLogic 8 Query Parsing issues in search:search-Need Help Hi Team, We are doing an Application migration from MarkLogic 5.0-5 to 8.0-4. In which we observe certain query parsing issues. Issue: We have been getting no results for the: query string: publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND regionName:"United States" AND source:"Pre-press" Some parameters returned are different between ML versions. Sample Query Snippet: import module namespace model = "http://condenast.com/dam/2.0/model/montrose; at "/application/model/montrose-model.xqy"; import module namespace search = "http://marklogic.com/appservices/search; at "/MarkLogic/appservices/search/search.xqy"; declare namespace cndam = "http://condenast.com/dam/2.0;; let $query := 'publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND regionName:"United States" AND source:"Pre-press"' return search:parse($query, model:build-all-options("Image")) Attaching the search options used.(please refer options.txt) ML5 result: http://marklogic.com/cts; xmlns:xs="http://www.w3.org/2001/XMLSchema;> http://condenast.com/dam/2.0;>_1:publicationName http://www.w3.org/2001/XMLSchema-instance;>Bon Appetit collation=http://marklogic.com/collation/codepoint<http://marklogic.com/collation/codepoint%3c/cts:option%3e> http://condenast.com/dam/2.0;>_1:coverDisplayDate October 2016 http://condenast.com/dam/2.0;>_1:region http://www.w3.org/2001/XMLSchema-instance;>United States collation=http://marklogic.com/collation/codepoint<http://marklogic.com/collation/codepoint%3c/cts:option%3e> Pre-press ML8 result: http://marklogic.com/cts;> http://condenast.com/dam/2.0;>_1:publicationName http://www.w3.org/2001/XMLSchema; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>Bon Appetit collation=http://marklogic.com/collation/codepoint<http://marklogic.com/collation/codepoint%3c/cts:option%3e> http://condenast.com/dam/2.0;>_1:coverDisplayDate October 2016 http://condenast.com/dam/2.0;>_1:region http://www.w3.org/2001/XMLSchema; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>United States collation=http://marklogic.com/collation/codepoint<http://marklogic.com/collation/codepoint%3c/cts:option%3e> source:Pre-press case-insensitive diacritic-insensitive wildcarded Question 1: Why is there a difference in the query formation for source:"Pre-press" in the word-query? ML5 ML8 Pre-press source:Pre-press case-insensitive diacritic-insensitive wildcarded Do we miss any of the ML configuration which renders such a query formation in ML8? I have been trying to pass only "Pre-press" as the query string instead of 'source:"Pre-press"'. Though it fetches the results, it breaks the facets response in search:response , the concept behind is we need to apply a source filter and show that it is applied to the front end Question 2: In MarkLogic 5: search:parse response is having the facet information. Along with this, we find search:query which contains all the currently selected facets and the search terms with the facet names and val
[MarkLogic Dev General] MarkLogic 8 Query Parsing issues in search:search-Need Help
Hi Team, We are doing an Application migration from MarkLogic 5.0-5 to 8.0-4. In which we observe certain query parsing issues. Issue: We have been getting no results for the: query string: publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND regionName:"United States" AND source:"Pre-press" Some parameters returned are different between ML versions. Sample Query Snippet: import module namespace model = "http://condenast.com/dam/2.0/model/montrose; at "/application/model/montrose-model.xqy"; import module namespace search = "http://marklogic.com/appservices/search; at "/MarkLogic/appservices/search/search.xqy"; declare namespace cndam = "http://condenast.com/dam/2.0;; let $query := 'publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND regionName:"United States" AND source:"Pre-press"' return search:parse($query, model:build-all-options("Image")) Attaching the search options used.(please refer options.txt) ML5 result: http://marklogic.com/cts; xmlns:xs="http://www.w3.org/2001/XMLSchema;> http://condenast.com/dam/2.0;>_1:publicationName http://www.w3.org/2001/XMLSchema-instance;>Bon Appetit collation=http://marklogic.com/collation/codepoint http://condenast.com/dam/2.0;>_1:coverDisplayDate October 2016 http://condenast.com/dam/2.0;>_1:region http://www.w3.org/2001/XMLSchema-instance;>United States collation=http://marklogic.com/collation/codepoint Pre-press ML8 result: http://marklogic.com/cts;> http://condenast.com/dam/2.0;>_1:publicationName http://www.w3.org/2001/XMLSchema; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>Bon Appetit collation=http://marklogic.com/collation/codepoint http://condenast.com/dam/2.0;>_1:coverDisplayDate October 2016 http://condenast.com/dam/2.0;>_1:region http://www.w3.org/2001/XMLSchema; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>United States collation=http://marklogic.com/collation/codepoint source:Pre-press case-insensitive diacritic-insensitive wildcarded Question 1: Why is there a difference in the query formation for source:"Pre-press" in the word-query? ML5 ML8 Pre-press source:Pre-press case-insensitive diacritic-insensitive wildcarded Do we miss any of the ML configuration which renders such a query formation in ML8? I have been trying to pass only "Pre-press" as the query string instead of 'source:"Pre-press"'. Though it fetches the results, it breaks the facets response in search:response , the concept behind is we need to apply a source filter and show that it is applied to the front end Question 2: In MarkLogic 5: search:parse response is having the facet information. Along with this, we find search:query which contains all the currently selected facets and the search terms with the facet names and values in qtextpre and qtextpost, and in the cts:text. But in ML8, this structure is more generic as seen below, we could not find the aaplied facet name details in the new xml structure. Attaching the logic used in the application to build the facets from search:response.(please refer build-facets.xqy) http://marklogic.com/appservices/search;> Bon Appetit Pre-press United States publication:"Bon Appetit" AND coverDisplayDate:"October 2016" AND regionName:"United States" AND source:"Pre-press" http://marklogic.com/cts;> http://condenast.com/dam/2.0;>_1:publicationName Bon Appetit collation=http://marklogic.com/collation/codepoint http://condenast.com/dam/2.0;>_1:coverDisplayDate October 2016 http://condenast.com/dam/2.0;>_1:region United States collation=http://marklogic.com/collation/codepoint http://condenast.com/dam/2.0;>_1:sourceGroup Pre-press collation=http://marklogic.com/collation/codepoint