You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by iostream <si...@gmail.com> on 2017/07/20 12:23:51 UTC

Pagination with TextQuery

Hi,

How to implement pagination with TextQuery? I want to fetch only the first
10 matches for my text query on the first page and the next 10 (from 11 to
20) on the second page.

Thanks!



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Pagination-with-TextQuery-tp15176.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Pagination with TextQuery

Posted by vkulichenko <va...@gmail.com>.
Query cursor results are paginated automatically while you iterate over the
cursor. I.e. if the page size is 1024 (default), you will never have more
than 1024 entries in local memory. After you finish iteration through the
first page, he second one will be requested, and so on. This allows to avoid
out of memory issues in case of large result sets.

To change the size of the page you can use Query#setPageSize method.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Pagination-with-TextQuery-tp15176p15199.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Pagination with TextQuery

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi,

There is no way to implement pagination with TextQuery
as there is no result order guarantee.


On Thu, Jul 20, 2017 at 3:23 PM, iostream <si...@gmail.com> wrote:

> Hi,
>
> How to implement pagination with TextQuery? I want to fetch only the first
> 10 matches for my text query on the first page and the next 10 (from 11 to
> 20) on the second page.
>
> Thanks!
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Pagination-with-TextQuery-tp15176.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Best regards,
Andrey V. Mashenkov