How to Index Custom Product Attributes (Technical Specifications)

Vote:
 

Hello,

We are planning to upgrade from Apache Solr to EPiServer Search & Navigation. We were able to use the out of box configuration of Episerver search & navigation index all the catalog entry items. we have a custom BFO which stores the attributes (RAM, Processor Type, HDD Size etc.,)  for these products and our existing indexing job used to index these attributes and performs a faceted search on this attributes. Can someone guide me in the right direction to perform the same task (faceted search on attributes) with EpiServer Search & Navigation?

Thanks,

Naveed Quadri

#225286
Jul 11, 2020 14:08
Vote:
 

I have no idea what you mean with a BFO. Have you tried an extension method to add them to the index? Assuming it's not a regualr property

SearchClient.Instance.Conventions
    .ForInstancesOf<ProductContent>()
    .IncludeField(x => x.BFO());
#225325
Jul 13, 2020 7:23
Syed Quadri - Jul 13, 2020 9:28
From BFO, I meant Business Foundation (https://world.episerver.com/documentation/developer-guides/commerce/business-foundation/). The product attributes are saved in this table as key-value pairs with a reference to CatalogEntry with a one to many relationship.
Vote:
 

You would need to add an extension method to your entry model, for example 

public static bool IsOK(this ProductContent productContent)

{

}

in which you load the BF object and returns the value(s). then you include this extension method to your model as Jeroen suggested.

Indexing performance might be a concern, however.

#225344
Jul 13, 2020 14:58
Syed Quadri - Jul 14, 2020 8:33
Thanks. Then can you please suggest the right approach to index this type of data structure without affecting the indexing or search performance and allowing to perform a faceted search on the attributes.
Vote:
 

Without knowing how many BF objects you have and how they are attached to the products, it's impossible for me to give a meaningful suggestion. However if you only have few BF objects to define the attributes, it might make senses to create a class to load them and place them in cache instead.

#225372
Jul 14, 2020 9:41
Vote:
 

Thanks a lot for working with on this.

I have attached a high-level schema and sample for your perusal. https://ibb.co/dMwjYFZ

Please let me know if it helps in guiding me in the right direction.

#225375
Jul 14, 2020 15:22
Vote:
 

Why can't you store the information as property of the product? I think it can be easily represented as a list 

#225376
Jul 14, 2020 15:49
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.