Using Solr pagination (cursors)
Pagination, also called cursors, supports using a cursor to scan results. Solr pagination restrictions apply.
DataStax Enterprise integrates native driver paging with Solr cursor-based paging. Pagination, also called cursors, supports using a cursor to scan results. Solr pagination restrictions apply. You can use CQL Solr queries and the Solr HTTP API.
Using pagination (cursors) with CQL Solr queries
- When using a driver with a CQL Solr query, you can specify to use pagination only when the driver uses pagination. Set cql_solr_query_paging: driver.
- To turn off pagination with CQL Solr queries, set cql_solr_query_paging: off.
-
To dynamically enable pagination when cql_solr_query_paging: off in dse.yaml, use the
"paging":"driver"
parameter:cqlsh> select id from wiki.solr where solr_query='{"q":"*", "sort":"id asc", "paging":"driver"}';
See the driver documentation for details. It is not mandatory to use a sort clause. However, if a sort clause is not provided, sorting is undefined.
SELECT * from ks.cf where solr_query='{"q":"*:*", "sort":"id asc, id2 asc"}'
SELECT * from ks.cf where solr_query='{"q":"*:*"}'
Using cursors with the HTTP API
To use cursors with the Solr HTTP API, it is not mandatory to provide a sort clause. However, if a sort clause is not provided, sorting is undefined. Do not make assumptions on sorting. Follow the steps in Using CQL Solr queries.