Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9668

Support cursor paging in SolrEntityProcessor

    XMLWordPrintableJSON

Details

    Description

      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:

      <?xml version="1.0" encoding="UTF-8" ?>
      <dataConfig>
        <document>
          <entity name="se" processor="SolrEntityProcessor" 
          query="*:*"
          rows="1000"
      
          cursorMark='true'
          sort="id asc"  
      
          url="http://localhost:8983/solr/collection1">
          </entity>
        </document>
      </dataConfig>
      

      If the cursorMark attribute is missing or is not 'true' then the default start/rows pagination is used.

      Attachments

        1. SOLR-9668.patch
          13 kB
          Mikhail Khludnev
        2. SOLR-9668.patch
          18 kB
          Mikhail Khludnev

        Issue Links

          Activity

            People

              mkhl Mikhail Khludnev
              yegor.kozlov Yegor Kozlov
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m