Hi,
TL; DR;
I need some help creating a custom Product Index Builder using Dynamicweb's as the foundation, so we can exclude Order related data, but after having looked at DW's source code, there are a lot of internal or private methods and properties from Ecommerce that prevent us from doing so.
Is there a way around that?
What we did?
We simply got ProductIndexBuilder.cs, set the Nuget Packages and tried to build it.
Internal or Private methods and properties
These are only some of the results:
- LoadPrimaryDetailImages
- LoadImagePatternManagers
- ProductIndexSchemaExtender
- Status.FailReason
- Status.FailException
- Status.FailExceptionMessage
- Status.FailExceptionStackTrace
- ProductCategoryFielValues
- ProductIndexSchemaExtender.FieldSeparator
- ProductIndexSchemaExtender.GetProductPriceFieldBaseSystemName
- ProductIndexSchemaExtender.GetComparablePrices
- PriceHelper
- ImagePatternManager
- ProductField.ProductCustomFieldPrefix
- Services.ProductRelated.Extract
- ProductCategoryFieldValues.PrepareProductValues
- ProductCategoryFieldValues.GetProductFieldValues
Why do we need a custom one?
- We have projects with thousands (sometimes millions) of orderlines and orders.
- These projects don't need the "Order Count" and "Order Growth" (nor any order related data) that is currently indexed
- These indexes are taking a lot of minutes to index
- There are no settings to exclude the order related data
- We know the indexes take a considerable amount of CPU usage and/or can leave the frontend hostage, so they need to run them in the middle of the night
- The scheduled task frequency (i.e. every 1 day), consideres the completed datetime, not the start datetime
so this means that in time, the index will start running in the middle of the day, and taking multiple minutes, and impacting the frontend becomes an issue
Feature Requests / Related threads
Just FYI, we've been posting some feature requests about this:
- https://doc.dynamicweb.com/forum/feature-requests/feature-requests/product-index-settings-skipallextendedfields
- https://doc.dynamicweb.com/forum/cms-standard-features/cms-standard-features/repository-tasks-repeat-interval
Best Regards,
Nuno Aguiar