Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Catalog content is ignoring the Find Id I have given it


I am indexing products and categories in Find and using an initialisation module to set the client conventions - see below.

    public class SearchIndexInitialization : IInitializableModule
        public void Initialize(InitializationEngine context)
            ContentIndexer.Instance.Conventions.ForInstancesOf().ShouldIndex(x => false);

                .IdIs(x => x.Barcode)
                .IncludeField(x => x.InStock())
                .IncludeField(x => x.DisplayPrice());               

                .IdIs(x => x.Barcode);

                .IdIs(x => x.Barcode);

                .IdIs(x => x.Barcode);

                .IdIs(x => x.Code);           


However, the ID field of Barcode and Code for Nodes does not seem to be used. When I run any queries the ID still looks something like this: "CatalogContent_93c105e2-8ed7-413f-b188-450cf3ad9f14_en-US"

Note that BaseProduct is the inherited type of other products and included fields do work. I added the other derived types explicitly just in case it was an inheritance issue but that seems to have no effect.

Is the standard behaviour, a bug or I missing something?

Aug 29, 2017 11:44

Are these Epi Commerce products? They will be indexed automatically and you shouldn't specify any ID fields. Epi has already picked a Find identity string.

Aug 29, 2017 21:20

Ahh, that's probably the issue. It looks like what Epi chooses involves a Guid i.e. CatalogContent_93c105e2-8ed7-413f-b188-450cf3ad9f14_en-US

My issue is I have an external process that does different batch updates of product data. One of the potential update is images. I wanted to be able to just update a single field on the find item. Something like this:

SearchClient.Instance.Update<MyProduct>(id).Field(x => x.ProductImages(), images);

The issue is I don't know the ID, though I would be getting the product code and barcode property in this instance.

Instead what I will have to do is

  • Perform a Search with a filter on the barcode to retrieve the item from Find
  • Update it
  • Reindex it

Aug 29, 2017 21:38

The Id should be constructed in term of CatalogContent_ContentGuid_Language

So if you have the content, you can construct the id from that 

Aug 30, 2017 9:26

Ahh I get it so it's using the ContentGuid property from CatalogContentBase.

Thanks @Quan Mai

Aug 30, 2017 9:38
* 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.