Hi, Danny,

Might there be more than one dateCreated node within one of the docs?  See 
http://marklogic.markmail.org/thread/4ttw53bul7ibx5cw.

-Brent

From: [email protected] 
[mailto:[email protected]] On Behalf Of Danny Sinang
Sent: Monday, May 07, 2012 10:20 AM
To: general
Subject: [MarkLogic Dev General] Invalid 'order by' value

Hi,

I'm trying to return an ordered list of log entries but am getting an "Invalid 
order by value'.

Below are the error details.

Looking at the dateCreated values, they all look normal to me.

For example, 
fn:doc("/trustedPartnerLogs/2608.xml")/trustedPartnerLog/dateCreated yields :

2012-05-04T10:16:17.642084-05:00

Any idea what i'm doing wrong ?

Regards,
Danny

==========================================================================================

query evaluated in xplana-dev at file::Modules/Xplana2/xqy as 1.0-ml (cq v4.2-6)

[1.0-ml] XDMP-ORDERBYVAL: order by $sessionLogs/dateCreated ascending -- 
Invalid 'order by' value 
(fn:doc("/trustedPartnerLogs/2608.xml")/trustedPartnerLog/dateCreated, 
fn:doc("/trustedPartnerLogs/2596.xml")/trustedPartnerLog/dateCreated, 
fn:doc("/trustedPartnerLogs/2598.xml")/trustedPartnerLog/dateCreated, ...)

Stack trace:
at 8
6:               for $sessionId in $sessionIds
7:               let $sessionLogs := $searchResults[sessionId=$sessionId]


8:               order by $sessionLogs/dateCreated
9:               return $sessionLogs/dateCreated
10:

xdmp:eval("let $searchResults := 
/trustedPartnerLog[customerId=&quot;DUMMY&...", (), <options 
xmlns="xdmp:eval"><database>7662317996035917662</database><root>Modules/Xplana2/xq...</options>)

$searchResults := (fn:doc("/trustedPartnerLogs/2608.xml")/trustedPartnerLog, 
fn:doc("/trustedPartnerLogs/2576.xml")/trustedPartnerLog, 
fn:doc("/trustedPartnerLogs/2580.xml")/trustedPartnerLog, ...)
$sessionIds := (xs:untypedAtomic("1000043_SESSION4"), 
xs:untypedAtomic("1000043_SESSION2"), xs:untypedAtomic("1000043_SESSION3"), ...)
$groupBy := "bookId"
in /eval.xqy at 115
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to