Hi Dynamicweb,
After upgrading a solution from 9.4 to 9.5 we are not able to build our index. This is the problem:
System.InvalidCastException: Unable to cast object of type 'Smartpage.Tiger.Products.Indexing.IndexBuilderExtender' to type 'Dynamicweb.Indexing.IndexBuilderExtenderBase`1[Dynamicweb.Ecommerce.Indexing.ProductIndexBuilder]'. at Dynamicweb.Ecommerce.Indexing.ProductIndexBuilder.WriteDocument(IndexDocument document, Int64 currentAutoId) in C:\Dynamicweb\Dynamicweb9\05 - Modules\Dynamicweb.Ecommerce\Dynamicweb.Ecommerce-1.5\Dynamicweb.Ecommerce\Indexing\ProductIndexBuilder.vb:line 1580 at Dynamicweb.Ecommerce.Indexing.ProductIndexBuilder.ProcessProducts() in C:\Dynamicweb\Dynamicweb9\05 - Modules\Dynamicweb.Ecommerce\Dynamicweb.Ecommerce-1.5\Dynamicweb.Ecommerce\Indexing\ProductIndexBuilder.vb:line 1118 at Dynamicweb.Ecommerce.Indexing.ProductIndexBuilder.Build(IIndexWriter writer, Tracker tracker) in C:\Dynamicweb\Dynamicweb9\05 - Modules\Dynamicweb.Ecommerce\Dynamicweb.Ecommerce-1.5\Dynamicweb.Ecommerce\Indexing\ProductIndexBuilder.vb:line 241
We have extended the product index with: IIndexBuilderExtender<ProductIndexBuilder>, and I can see that this is changed in the core code:
If Not SkipExtenders Then For Each extender In Extenders extender.ExtendDocument(document) Next End If
Is changed to:
If Not SkipExtenders Then For Each extender As IndexBuilderExtenderBase(Of ProductIndexBuilder) In Extenders extender.ExtendDocument(document) extender.IndexBuilder = Me Next End If
Should the code be fixed or should our IndexBuilderExtender be changed?
Best regards, Anders