Redirected sitemaps in SiteMapParserBolt / SiteMapFilter
Hi!
When the SiteMapParserBolt processes a redirected sitemap that contains links (see for example http://sample-sitemap.xml), the isSitemapKey is added only after the outlinks have been processed. If the SiteMapFilter is also enabled, then all the links are filtered out since the SiteMapParserBolt.isSitemapKey is false. This is fixed when the metadata.setValue(isSitemapKey, "true") is moved before the outlinks processing.
Also, the sniff method returns false for some sitemaps, because of the small maxOffsetGuess. For example, for this sitemap. This can be fixed by increasing sitemap.offset.guess, however, this might impact performance.
Should I create a PR with the fix for SiteMapParserBolt? Should I take a shot at a different (efficient) way of "sniffing" a possible sitemap format?
Thanks, Markos
Feel free to provide a PR with a fix. We can follow up with a more efficient approach in an additional PR. WDYT?