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.
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
