Reputation: 101
I'm doing a search in opencms (10.5.1) and need to use the solr cursors, but I don't know how to get the nextCursorMark with opencms.
Is there a way to get the nextCursorMark in opencms?
Upvotes: 0
Views: 127
Reputation: 101
I was able to get the nextCursorMark as follows:
CmsSolrQuery squery = new CmsSolrQuery(null,
CmsRequestUtil.createParameterMap(query));
CmsSolrResultList results = index.search(cmso, squery,true);
SolrQuery sorlquery = results.getQuery();
String cursor = sorlquery.get("cursorMark");
SolrClient client = new HttpSolrClient("http://localhost:9090/opencms/handleSolrSelect");
QueryResponse resp = client.query(sorlquery);
String nextCursor = resp.getNextCursorMark();
Upvotes: 0