Hi All,

I am passing sequence of value to cts:search   function as attribute 
range-query   . Will cts: search return the content in same order of sequence 
element passed.
I want to get the result as  sorted by "18hduye" ," 38h34ye" ," 28h55e".

Example:   let $seq := ("18hduye","38h34ye","28h55e")
                      return  
cts:search(fn:doc(),cts:element-attribute-range-query(xs:QName("emp") 
,xs:QName("id"),"=",$seq ))

Will the above function return the Employee  in same sequence as above 
mentioned in seq variable. Or   do we have any other way to sort the content as 
passed $seq variable.

As per  my understanding order by will work only resultset which we got from 
cts:search .
I found one way  as :
     let  $content  := 
cts:search(fn:doc(),cts:element-attribute-range-query(xs:QName("emp") 
,xs:QName("id"),"=",$seq ))
    for $each in $seq
   return $content[@id=$each]

This way I am making sure the correct order but it will slow our process the 
get the result set for thousands of object.

Regards,
Vikas Singh




This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient(s), please reply to the sender and 
destroy all copies of the original message. Any unauthorized review, use, 
disclosure, dissemination, forwarding, printing or copying of this email, 
and/or any action taken in reliance on the contents of this e-mail is strictly 
prohibited and may be unlawful. Where permitted by applicable law, this e-mail 
and other e-mail communications sent to and from Cognizant e-mail addresses may 
be monitored.
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to