How to do paging with a Cassandra query?

928 views
Skip to first unread message

Carlos Scheidecker

unread,
Sep 6, 2014, 9:41:07 PM9/6/14
to java-dri...@lists.datastax.com
Hello all,

I am not particularly fond of spring-data-cassandra so I am using the code driver with https://github.com/valchkou/cassandra-driver-mapping/ as well.

Now, my question is: How do you do paging with it?

In a JPA Spring example, it would be something like this:

 public Page<SearchResult<Ticket>> search(String query,
                                                   boolean useBooleanMode,
                                                   Pageable pageable) {
}


Alex Popescu

unread,
Sep 6, 2014, 10:49:31 PM9/6/14
to java-dri...@lists.datastax.com
Hi Carlos,

As I've mentioned in the other email, there is no connection between the object mapping solution included in the Datastax Java driver for Cassandra and the project you mentioned, so you'll probably want to direct your question to their mailing list.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.


--

:- a)


Alex Popescu
Sen. Product Manager @ DataStax
@al3xandru

Daniel Anderson

unread,
Sep 8, 2014, 11:48:30 PM9/8/14
to java-dri...@lists.datastax.com
Hi Carlos,

If spring-data-cassandra implemented that API (not sure if they do), it would be very inefficient.

If you have DataStax enterprise, you can use the SOLR integration (and go through SOLR) to get that type of paging. If you want to use Cassandra directly, this is the best that you can do http://architecturalatrocities.com/post/13918146722/implementing-column-pagination-in-cassandra .

Dan
Reply all
Reply to author
Forward
0 new messages