Thanks, Mark.

On Thu, Aug 6, 2009 at 10:13 AM, Mark Helmstetter <
[email protected]> wrote:

>  Surajit,
>
>
>
> The third argument to search:search() is $start, and the fourth argument is
> $page-length.  See the api docs for more details:
> http://developer.marklogic.com/pubs/4.1/apidocs/SearchAPI.html#search:search
>
>
>
> So if you wanted results 21 to 30 the syntax would be something like:
>
>
>
> xquery version "1.0-ml";
>
> import module namespace search = "http://marklogic.com/appservices/search";
>
>     at "/MarkLogic/appservices/search/search.xqy";
>
>
>
> let $query-text := "mark logic"
>
> let $query-options :=
>
> <options xmlns="http://marklogic.com/appservices/search";>
>
>     <return-results>true</return-results>
>
>     <return-facets>false</return-facets>
>
> </options>
>
> let $start := 21
>
> let $page-length := 10
>
> return search:search($query-text, $query-options, $start, $page-length)
>
>
>
>
>
> --Mark
>
>
>  ------------------------------
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Surajit
> Bhattacharjee
> *Sent:* Thursday, August 06, 2009 8:59 AM
> *To:* General Mark Logic Developer Discussion
> *Subject:* [MarkLogic Dev General] pagination using new search API
>
>
>
> The new search API takes a page-length attribute but it always seems to
> return records 1 to page-length. How do I tell it to return records 21 to 30
> for example?
>
>
>
> Surajit
>
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to