Memory issue indexing large sets

When I try to index a large set of items (50000+), the index process stops with an out-of-memory exception, although PHP can allocate 1GB of memory.

Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 2621440 bytes) in /var/www/omeka-s/vendor/doctrine/dbal/lib/Doctrine/DBAL/SQLParserUtils.php on line 199

I problem exists in AdvancedSearch/SearchSolr versions 3.4.42/3.5.54 and 3.4.43/3.5.55, so I don't think it's related to the migration from Resource to ResourceRepresentation in SearchSolr.

Maybe this could be solved with a "index offset" and "limit" option? This would allow to index a small set of data (to test) and allow to index large data sets by creating multiple jobs that index chunks of data.