SaaS CMS has officially launched! Learn more now.

Incremental Search Index - CatalogIndexBuilder Not Processing Products

Vote:
 

Hi!

I am using Optimizely Search (not Search & Navigation) for indexing product catalog content. I extended the CatalogIndexBuilder to add some additional calculated fields to the indexer. The issue I am having is when I update ProductContent in the UI and then run the Incremental Search Index scheduled job, the custom indexer does not get triggered for the updates on the product. If I update VariationContent in the UI and then run the Incremental Search Index scheduled job, the customer indexer does get triggered for the updates on the variant. I was wondering why the indexer is not getting triggered when I update ProductContent.

This is the documentation I was following while creating my custom Indexer:

https://docs.developers.optimizely.com/commerce/v13.0.0-commerce-cloud/docs/customizing-search

I was also using the Quicksilver project as an example.

https://github.com/episerver/Quicksilver

Specifically in the indexer in the example project they are limiting to ProductContent and that works.

https://github.com/episerver/Quicksilver/blob/master/Sources/EPiServer.Reference.Commerce.Site/Infrastructure/Indexing/CatalogIndexer.cs

protected override void OnCatalogEntryIndex(ref SearchDocument document, CatalogEntryDto.CatalogEntryRow entry, string language)
        {
            switch (entry.ClassTypeId)
            {
                case EntryType.Package:
                case EntryType.Bundle:
                case EntryType.Product:
                    UpdateSearchDocument(ref document, entry.Code, language);
                    break;
            }
        }

Is there some setting that I do not know about that disables ProductContent from getting processed? Or does the Incremental Search Index scheduled job not ever process ProductContent?

Thanks,

Jacob

#284236
Jul 22, 2022 22:14
Vote:
 

DId you update your Mediachase.search.config to use your new CatalogIndexer? 

  <Indexers basePath="SEARCH_INDEX_NETWORK_PATH">
    <add name="catalog" type="Mediachase.Search.Extensions.Indexers.CatalogIndexBuilder, Mediachase.Search.Extensions" />
  </Indexers>
#284271
Jul 23, 2022 8:50
Vote:
 

The Mediachase.search.config was updated to use the new CatalogIndexer. The issue is when I update a VariantContent in the product catalog the custom indexer is triggered but when I update a ProductContent the custom indexer does not get triggered.

#284310
Jul 24, 2022 22:36
Vote:
 

Could you debug to see if it even runs into OnCatalogEntryIndex ?

#284362
Jul 25, 2022 8:44
Vote:
 

It does not get into my custom OnCatalogEntryIndex method when the product is updated.

#284466
Jul 26, 2022 22:45
Vote:
 

How do you update your product. If memory serves, OnCatalogEntryIndex is only triggered if the CatalogEntryDto is updated, not the MetaObject. i.e. if you update the properties of a product, it is not triggered 

#284509
Jul 27, 2022 6:16
Vote:
 

Your memory serves you correctly. Thanks. The OnCatalogEntryIndex is not triggered for a product when the MetaObject is updated, only when CatalogEntryDto is updated. The interesting thing is the OnCatalogEntryIndex is triggered for a variant when either the MetaObject is updated or the CatalogEntryDto is updated.

I think I am going to try to use the PublishedContent event to trigger a CatalogEntryDto save when either the variant or product is published so that the Incremental Search Index will trigger.

#284524
Jul 27, 2022 16:04
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.