return uris from last 10 days only
I am using this query.
I have checked the elenent indexes are there.. it has something got to do with how i am running the script.
cts:uris((), (),
cts:and-query((
cts:collection-query("http://nl.abnamro.com/cre/canonical"),
cts:collection-query("http://nl.abnamro.com/cre/source/rapid"),
cts:collection-query("latest"),
cts:and-query((
cts:element-range-query(xs:QName("cre:ingestTime"), "<=", $selectedDate),
cts:element-range-query(xs:QName("cre:ingestTime"), ">=", $chooseDate)
))
)), (),
functx:value-intersect(xdmp:host-forests(xdmp:host()), xdmp:database-forests(xdmp:database()))
)
here selectedDate is 10th day from today means 17th march and chooseDate is todays date. When I run this it gives below error :-
XDMP-ELEMRIDXNOTFOUND: cts:uris((), (), cts:and-query((cts:collection-query("http://nl.abnamro.com/cre/canonical"), cts:collection-query("http://nl.abnamro.com/cre/source/rapid"), cts:collection-query("latest"), ...), ()), (), (xs:unsignedLong("10633348138131917664"), xs:unsignedLong("11995695142322219087"))) -- No string element range index for {http://nl.abnamro.com/cre}ingestTime collation=http://marklogic.com/collation/