Hi I tried to perform query trace on all these 3 queries.
Interestingly all are selecting one fragment which is expected but the 2nd query is not giving me count and also when I remove count I am not getting the document back. Any valid reasons for this issue? Regards, Gnana(GP) ------------------------- Date: Wed, 21 May 2014 14:12:39 +0000 From: <[email protected]> Subject: [MarkLogic Dev General] Path Range Query Not working as expected To: <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset="us-ascii" Hi I am having an issue with path range query. all of a sudden am getting different results. declare namespace res = "http://www.hmh.com/resource"; declare variable $collection := "Resources"; declare variable $case-insensitive-collation := "collation=http://marklogic.com/collation//S2"; declare variable $case-insensitive-numeric-collation := "collation=http://marklogic.com/collation//S2/MO"; declare variable $types := cts:values(cts:path-reference("*:level/@type",$case-insensitive-collation)); xdmp:estimate(cts:search(fn:collection("Resources"), cts:and-query(( cts:path-range-query("*:program","=","TX Biology",$case-insensitive-collation), cts:path-range-query("*:grade","=","9",$case-insensitive-numeric-collation), cts:element-attribute-value-query(xs:QName("res:resource"), xs:QName("id"), "9780544073890_10750"))))), fn:count(cts:search(fn:collection("Resources"), cts:and-query(( cts:path-range-query("*:program","=","TX Biology",$case-insensitive-collation), cts:path-range-query("*:grade","=","9",$case-insensitive-numeric-collation), cts:element-attribute-value-query(xs:QName("res:resource"), xs:QName("id"), "9780544073890_10750"))))), fn:count(cts:search(fn:collection("Resources"), cts:and-query(( cts:element-value-query(xs:QName("res:program"), "TX Biology"), cts:element-value-query(xs:QName("res:grade"), "9"), cts:element-attribute-value-query(xs:QName("res:resource"), xs:QName("id"), "9780544073890_10750"))))) This results in 1, 0 and 1 I used estimate in first one and count in second one. That's the only difference and the 3rd one I used value query instead of path range. Can someone clarify me why I am seeing different results for these ? Regards, Gnanaprakash Bodireddy 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://developer.marklogic.com/pipermail/general/attachments/20140521/1d10ead6/attachment.html ------------------------------ _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general End of General Digest, Vol 119, Issue 30 **************************************** 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 [email protected] http://developer.marklogic.com/mailman/listinfo/general
