Inserting a temporal document in temporal collection - throws error

62 views Asked by At

I am executing a xquery to insert a temporal document in a temporal collection in MarkLogic database. I am getting below error -

Note: I have created element range index in MarkLogic Database Schemas. I have also created temporal collection using those axes.

Here is the xquery -

xquery version "1.0-ml";
import module namespace temporal = "http://marklogic.com/xdmp/temporal"
      at "/MarkLogic/temporal.xqy";
let $root :=
<tempdoc>
   <trader>John</trader> 
    <content>12</content>  
</tempdoc>
let $options :=  
<options xmlns="xdmp:document-insert">
    <metadata>
       <map:map xmlns:map="http://marklogic.com/xdmp/map">
        <map:entry key="systemStart">
           <map:value>2014-04-03T11:00:00</map:value>
         </map:entry>
         <map:entry key="systemEnd">
           <map:value>9999-12-31T11:59:59Z</map:value>
         </map:entry>
         <map:entry key="validStart">
           <map:value>2014-04-03T11:00:00</map:value>
         </map:entry>
         <map:entry key="validEnd">
           <map:value>9999-12-31T11:59:59Z</map:value>
         </map:entry>
       </map:map>
    </metadata> 
</options> 
return temporal:document-insert("temporalCollection", "koolorder.xml", $root, $options)

Here is the error -

[1.0-ml] XDMP-NOFIELD: xdmp:eval("xquery version &quot;1.0-ml&quot;;&#10;import module namespace t...", (), <options xmlns="xdmp:eval"><database>1754687030342455867</database>...</options>) -- Field not defined: systemStart
0

There are 0 answers