public function index(BulkOperation $bulk, Iterator $records)
    {
        foreach ($this->createFetchersForRecords($records) as $fetcher) {
            $submitted_records = [];
            $databox = $fetcher->getDatabox();

            // post fetch : flag records as "indexing"
            $fetcher->setPostFetch(function(array $records) use ($fetcher, $databox) {
                RecordQueuer::didStartIndexingRecords($records, $databox);
                // do not restart the fetcher since it has no clause on jetons
            });

            // bulk flush : flag records as "indexed"
            $bulk->onFlush(function($operation_identifiers) use ($databox, &$submitted_records) {
                $this->onBulkFlush($databox, $operation_identifiers, $submitted_records);
            });

            // Perform indexing
            $this->indexFromFetcher($bulk, $fetcher, $submitted_records);
        }
    }