[MarkLogic Dev General] Pagination while using fn:contains()

Geert Josten geert.josten at dayon.nl
Tue Aug 7 07:42:12 PDT 2012


Hi Himanshu,



Sure you can, but the performance might be pretty bad. Basic routine for
pagination is something like this:



let $start := 21

let $size = 10

let $end := $start + $size – 1

return (

  (: expression that returns documents :)

)[$start to $end]



Kind regards,

Geert



*Van:* general-bounces at developer.marklogic.com [mailto:
general-bounces at developer.marklogic.com] *Namens *himanshu kapsime
*Verzonden:* dinsdag 7 augustus 2012 15:55
*Aan:* MarkLogic Developer Discussion
*Onderwerp:* [MarkLogic Dev General] Pagination while using fn:contains()



Hi,
Is it possible to do pagination while doing search with the help of
fn:contains() ?
Actually I am finding it difficult to get total number of search results
while using fn:contains() and I know it is easily available if I am using
search:search() but I need to use fn:contains() only.

Regards
Himanshu Kapsime
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20120807/0de27149/attachment.html 


More information about the General mailing list