[MarkLogic Dev General] Issue with Mark Logic Query
Hi All,
I have a database where the element range index is on the element date, and now i am executing a query where i have used element value query on one of the elements, but the results fetched are not adhering to the query, please suggest the changes that i need to make.
let $uri :=(cts:uris('', ('document','limit=1000000'),
(cts:and-query((cts:directory-query('/content/', 'infinity'),
cts:element-query((xs:QName('meta:DateLoaded')),'2011*'),
cts:element-query((xs:QName('meta:PubName')),'Springer'),
cts:element-query(xs:QName('Affiliation'), cts:and-query((), ())),
cts:element-query(xs:QName('meta:Institution'),cts:and-query((),())),
cts:not-query(cts:element-query(xs:QName("meta:GeoOrg"), cts:and-query((), ())))
), ())), (), ()))[1 to 1000000]
return (count($uri),$uri)
In the above query it is fetching me uri's of those articles where the meta dateloaded is 2010. Please suggest
--
Regards
Amit
<div><p>Hi All,<br><br>I have a database where the element range index is on the element date, and now i am executing a query where i have used element value query on one of the elements, but the results fetched are not adhering to the query, please suggest the changes that i need to make.<br><br>let $uri :=(cts:uris('', ('document','limit=1000000'),<br> (cts:and-query((cts:directory-query('/content/', 'infinity'),<br> cts:element-query((xs:QName('meta:DateLoaded')),'2011*'),<br>
cts:element-query((xs:QName('meta:PubName')),'Springer'),<br> cts:element-query(xs:QName('Affiliation'), cts:and-query((), ())),<br> cts:element-query(xs:QName('meta:Institution'),cts:and-query((),())),<br>
cts:not-query(cts:element-query(xs:QName("meta:GeoOrg"), cts:and-query((), ())))<br> ), ())), (), ()))[1 to 1000000]<br>return (count($uri),$uri)<br><br><br>In the above query it is fetching me uri's of those articles where the meta dateloaded is 2010. Please suggest<br clear="all"><br>-- <br>Regards<br>Amit <br><br><br></p></div>