SolrEntityProcessor paginates using the start and rows parameters which can be very inefficient at large offsets. In fact, the current implementation is impracticable to import large amounts of data (10M+ documents) because the data import rate degrades from 1000docs/second to 10docs/second and the import gets stuck.
This patch introduces support for cursor paging which offers more or less predictable performance. In my tests the time to fetch the 1st and 1000th pages was about the same and the data import rate was stable throughout the entire import.
To enable cursor paging a user needs to:
- add cursorMark='true' attribute in the entity configuration;
- "sort" attribute in the entity configuration see note about sort at https://cwiki.apache.org/confluence/display/solr/Pagination+of+Results ;
- remove timeout attribute.
If the cursorMark attribute is missing or is not 'true' then the default start/rows pagination is used.