Zend certified PHP/Magento developer

Magento 2 – Split large dataset XML Files, create a MAIN/INDEX XML RSS feed: Product data for Google parsing compatibility

I am busy creating a custom XML implementation for Google data; following these specifications: Google XML RSS v2.0 specification

Question

How can I split a RSS feed into multiple XML files, and then have a ‘report/index’ linked RSS feed file to reference those XML files so that Google can parse the content correctly? The complete RSS index format, in any way…

Issue

Summary: (the XML data files are already correctly saved, I just need to ‘make an index file’ of RSS that Google will recognize

Currently; I already have custom data fetched from Magento 2, split into sets of ~1000 products per XML file (total 27000+ products); because processing Repository data for this amount of products takes 25+ minutes, so the current solution of splitting the data into smaller data sets doesn’t cause timeout issues.

Files for the set of data that needs indexed file are saved in a location:

/var/site1/feeds/productfeed/1.xml
/var/site1/feeds/productfeed/2.xml
/var/site1/feeds/productfeed/3.xml
.... etc.

How to create RSS XML index file?

Now, since this is supposed to be RSS XML data that Google should be fetching from a singular XML file, how do I proceed?

Idea from sitemap.xml

I remembered the sitemap file,
sitemap.xml in Magento 2 looks like this:
(Google indexing fetches the main sitemap.xml)

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://domain.somewhere/sitemap-1-1.xml</loc>
<lastmod>2022-05-14T17:00:55+00:00</lastmod>
</sitemap>
<sitemap>
<loc>https://domain.somewhere/sitemap-1-2.xml</loc>
<lastmod>2022-05-14T17:00:55+00:00</lastmod>
</sitemap>
</sitemapindex>

So, I want to know if something similar can be achieved for the RSS listing?

Google listing resources