While performing some work for a demo recently that involved Product.STRUCTURE_HIERARCHICAL (or Directory-based) products, I found out that the CoreMetExtractor chokes and causes ingestion to fail.
This is due to the following function, which incorrectly assumes that DataStoreReferences exist and that Versioning has already occured:
A local workaround that appears to be succeeding is assuming that the first Reference even in a Hierarchical product is the initial ref. This works fine for the LuceneCatalog which preserves the ordering of References as they are inserted, but not sure it would work for the DataSourceCatalog which I'm not sure exactly preserves the ordering of References.
I'll look into a generalized solution. And I'll add a unit test.