Raghu, Are you accidentally adding the userId inside the modification date? The index on modificationdate will index the "atomized" value
fn:data(<modificationdate><userId>123</userId>2002-11-11</modificationdate>) => 1232002-11-11. So that might explain why you corrupt your date value to be invalid only when you add a child. Just a guess. If you post a simple bit of code that replicates the problem it may help understand what's going on. Yours, Damon From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Raghu Sent: Wednesday, September 19, 2012 2:53 AM To: MarkLogic Developer Discussion Cc: sudheer chowdary yalaverthi; Joseph Anbu Doss Gnanadoss Subject: Re: [MarkLogic Dev General] XDMP-RANGEINDEX while invoking a module Hi Mike, The Marklogic version I'm using is 5.0-3 And the range index configuration is <scalar-type>dateTime</scalar-type> <namespace-uri>http://mynamespace</namespace-uri> <localname>modificationdate</localname> <collation /> <range-value-positions>false</range-value-positions> Thanks Raghu On Tue, Sep 18, 2012 at 10:44 PM, Michael Blakeley <m...@blakeley.com<mailto:m...@blakeley.com>> wrote: Which version of MarkLogic Server are you using? What is the range index configuration? -- Mike On 18 Sep 2012, at 07:12 , Raghu wrote: > HI All, > > I am invoking an xquery and I'm getting the following error > > XDMP-RANGEINDEX: xdmp:invoke("module.xqy", (fn:QName("", "user-id"), > "123", fn:QName("", "product-id"), ...)) -- Range index error: dateTime > fn:doc("/documentname.xml")/parentnode/childnode[2]/modificationdate: > XDMP-CAST: (err:FORG0001) Invalid cast: xs:untypedAtomic("123") cast as > xs:dateTime > > The module invoked is inserting a node with following element-values > > modificationdate - range index present (dateTime) > userid > itemid > > I triple checked/logged the values and there is no reason that userid value > to be taken as modification date value. This happens only when there is > already a child entry is present and I'm adding another child, I suspect > that the existing child has some special characters in it. Could somebody > please tell me if special characters could cause this kind of error, or is > there something else I should check with. > > Thanks in advance > Raghu > > _______________________________________________ > General mailing list > General@developer.marklogic.com<mailto:General@developer.marklogic.com> > http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list General@developer.marklogic.com<mailto:General@developer.marklogic.com> http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general