[XQZone General] Internal error: St9bad_alloc
McBeath, Darin W (ELS-AMS)
D.McBeath at elsevier.com
Thu Jun 30 12:14:43 PDT 2005
Rashid.
One approach (that should work) would be to use a predicate on the first
parameter to cts:search. You would also want to create a range index on
published-date to ensure good performance.
So, it might look something like this.
$assets := cts:search(doc("/assetsdup.xml")/assets/asset[.//published-date <
x and .//published-date > y],
I'm sure there are other (possibly better and/or more elegant solutions).
Darin.
_____
From: general-bounces at xqzone.marklogic.com
[mailto:general-bounces at xqzone.marklogic.com] On Behalf Of Nizamuddin,
Rashid
Sent: Thursday, June 30, 2005 2:52 PM
To: General XQZone Discussion
Subject: RE: [XQZone General] Internal error: St9bad_alloc
I need to generate a result based on the date range here is my query let
$assets := cts:search(doc("/assetsdup.xml")/assets/asset,
cts:and-query((
cts:element-word-query(xs:QName("file-type"), $fileType),
cts:element-word-query(xs:QName("stage"), $stage),
cts:element-word-query(xs:QName("published-date"), $startDate),
cts:element-word-query(xs:QName($user-id-type), $userId)
) )
)
for $asset in $assets
return <asset> { $asset/file-type } { $asset/stage } {
$asset/file-name }
</asset>
The published-date should be a range, as of now I have only the start date.
Is there a way to give the date range
Thanks
Rashid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20050630/78746a04/attachment.html
More information about the General
mailing list