CatalogContext FindNodesDto - How to retrieve MetaData

Vote:
 

We are trying to retrieve the Meta data for Category Nodes that are a few levels down from the top. We are using the FindNodesDto to retrieve the nodes but we need the additional meta data fields. Currently after getting the category nodes from FindNodesDto we are loading the meta data using ContentLoader. The issue is this is really slow. We were wondering if there was a way to load the meta data with the FindNodesDto or another way to with better performance.

Our Catalog structure is:

  • Level 1 (Manufacturer)
    • Level 2 (Series)
      • Level 3 (Machine)
        • Level 4 (Product Type) [This is the level we are retrieving]
          • Commerce Product Data

Here is the sql where clause for our FindNodesDto method call:

CatalogSearchParameters par = new CatalogSearchParameters();
par.SqlWhereClause = String.Format("CatalogNode.ParentNodeId IN " +
                    "(SELECT CatalogNodeId FROM CatalogNode WHERE ParentNodeId IN " +
                    "(SELECT CatalogNodeId FROM CatalogNode WHERE ParentNodeId IN " +
                    "(SELECT CatalogNodeId FROM CatalogNode WHERE Name = '{0}')))", cat.Name);

cat.Name is the Manufacturer name.

#283635
Jul 13, 2022 15:34
Vote:
 

The recomended way is to use the Search and Navigation (Find API) for performance issue. That is and easy way too to retrieve the CMS/Commerce items. Another way of doing that is using service api. But that will need huge efforts for small stuff.

Find search (start here): https://docs.developers.optimizely.com/commerce/v14.0.0-commerce-cloud/docs/search

Service Api reference: https://docs.developers.optimizely.com/commerce/v1.3.0-service-api-developer-guide/docs/catalog

#283637
Edited, Jul 13, 2022 18:31
Vote:
 

Thanks for the suggestion, unfortunately we cannot use Search and Navigation for this project as much as I would prefer the client switch. I was able to use Search to solve my issue. I ended up storing the information from the categories in the Index for each product. I was then able to search on that information to display it to the user. This ended up increasing the performance of the feature too.

#284235
Jul 22, 2022 21:50
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.