News Feeds

No results for 'undefined'
Powered by Algolia

Model pagination on list collection in cassandra

Author: user888270

Originally Sourced from:

Lets say i have a table pagelabels which keep track of page labelled by user with a label -

The table i have is as below -

CREATE TABLE pagelabels (
    pageid text PRIMARY KEY,
    label list<string> // A list of label on this pageid

i want to show user 10 label initially on page sorted by insertion time on opening the page. When user asks for more labels by clicking on load more labels, i should return next 10 labels on this page. How can i support such pagination scheme? Should I consider changing my Data model in this case?