You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Cyril Auburtin <cy...@gmail.com> on 2012/06/11 22:16:20 UTC
Offset in slicequeries for pagination
using 10 results maximum per page,
to go directly to 14th page, there is no offset=141 possibility I guess? or
does a Java client proposes that?
What is the best solution, perform a get with a limit = page*10, and then a
get with a column_start equals the lastest column received, and a limit of
10,
I guess also, client side should cache results but it's off topic
Re: Offset in slicequeries for pagination
Posted by Rajat Mathur <ra...@gmail.com>.
Hi Cyril,
This may help.
http://architecturalatrocities.com/post/13918146722/implementing-column-pagination-in-cassandra
On Tue, Jun 12, 2012 at 3:18 AM, Cyril Auburtin <cy...@gmail.com>wrote:
> If my columns are ("k1:k2" => data1), ("k11:k32" => data211), ("k10:k211"
> => data91)
>
> U mean transforming to ("1:k1:k2" => data1), ("2:k11:k32" => data211) but
> I need the previous columns names to slice query on them
>
> 2012/6/11 R. Verlangen <ro...@us2.nl>
>
> I solved this with creating a manual index with as column keys integers
>> and column values the uuid's of the results. Then run a slicequery to
>> determine the batch to fetch.
>>
>>
>> 2012/6/11 Cyril Auburtin <cy...@gmail.com>
>>
>>> using 10 results maximum per page,
>>>
>>> to go directly to 14th page, there is no offset=141 possibility I guess?
>>> or does a Java client proposes that?
>>>
>>> What is the best solution, perform a get with a limit = page*10, and
>>> then a get with a column_start equals the lastest column received, and a
>>> limit of 10,
>>> I guess also, client side should cache results but it's off topic
>>>
>>
>>
>>
>> --
>> With kind regards,
>>
>> Robin Verlangen
>> *Software engineer*
>> *
>> *
>> W http://www.robinverlangen.nl
>> E robin@us2.nl
>>
>> Disclaimer: The information contained in this message and attachments is
>> intended solely for the attention and use of the named addressee and may be
>> confidential. If you are not the intended recipient, you are reminded that
>> the information remains the property of the sender. You must not use,
>> disclose, distribute, copy, print or rely on this e-mail. If you have
>> received this message in error, please contact the sender immediately and
>> irrevocably delete this message and any copies.
>>
>>
>
--
*Rajat Mathur
B.Tech (IT) Final Year
IIIT Allahabad
09945990291
Find me @ Facebook <http://www.facebook.com/rajatmathurr>
Follow me @ Twitter <http://www.twitter.com/Raj_Mathur>*
Re: Offset in slicequeries for pagination
Posted by Cyril Auburtin <cy...@gmail.com>.
If my columns are ("k1:k2" => data1), ("k11:k32" => data211), ("k10:k211"
=> data91)
U mean transforming to ("1:k1:k2" => data1), ("2:k11:k32" => data211) but
I need the previous columns names to slice query on them
2012/6/11 R. Verlangen <ro...@us2.nl>
> I solved this with creating a manual index with as column keys integers
> and column values the uuid's of the results. Then run a slicequery to
> determine the batch to fetch.
>
>
> 2012/6/11 Cyril Auburtin <cy...@gmail.com>
>
>> using 10 results maximum per page,
>>
>> to go directly to 14th page, there is no offset=141 possibility I guess?
>> or does a Java client proposes that?
>>
>> What is the best solution, perform a get with a limit = page*10, and then
>> a get with a column_start equals the lastest column received, and a limit
>> of 10,
>> I guess also, client side should cache results but it's off topic
>>
>
>
>
> --
> With kind regards,
>
> Robin Verlangen
> *Software engineer*
> *
> *
> W http://www.robinverlangen.nl
> E robin@us2.nl
>
> Disclaimer: The information contained in this message and attachments is
> intended solely for the attention and use of the named addressee and may be
> confidential. If you are not the intended recipient, you are reminded that
> the information remains the property of the sender. You must not use,
> disclose, distribute, copy, print or rely on this e-mail. If you have
> received this message in error, please contact the sender immediately and
> irrevocably delete this message and any copies.
>
>
Re: Offset in slicequeries for pagination
Posted by "R. Verlangen" <ro...@us2.nl>.
I solved this with creating a manual index with as column keys integers and
column values the uuid's of the results. Then run a slicequery to determine
the batch to fetch.
2012/6/11 Cyril Auburtin <cy...@gmail.com>
> using 10 results maximum per page,
>
> to go directly to 14th page, there is no offset=141 possibility I guess?
> or does a Java client proposes that?
>
> What is the best solution, perform a get with a limit = page*10, and then
> a get with a column_start equals the lastest column received, and a limit
> of 10,
> I guess also, client side should cache results but it's off topic
>
--
With kind regards,
Robin Verlangen
*Software engineer*
*
*
W http://www.robinverlangen.nl
E robin@us2.nl
Disclaimer: The information contained in this message and attachments is
intended solely for the attention and use of the named addressee and may be
confidential. If you are not the intended recipient, you are reminded that
the information remains the property of the sender. You must not use,
disclose, distribute, copy, print or rely on this e-mail. If you have
received this message in error, please contact the sender immediately and
irrevocably delete this message and any copies.