Using Solr pagination (cursors)
Pagination, also called cursors, support 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 cursors with CQL Solr queries
When using a driver with a CQL Solr query, cursors are transparently activated when the driver is using pagination. To turn off cursors with CQL Solr queries, deactivate driver pagination. 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.
DataStax Enterprise 4.7.0 onlyPAGING OFF
. To set a preferred FetchSize, consult
the driver documentation because LIMIT does not apply. LIMIT is respected in 4.7.1 and later.
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.