Sitecore tips and tricks and community news !

Post Top Ad

Post Top Ad

Showing posts with label index. Show all posts
Showing posts with label index. Show all posts
5:18 PM

Indexing xCommerce products with site languages versions



 

The default approach for Sitecore and xCommerce for indexing commerce items is to get items languages in as many version as you have defined in xCommerce. 

 

But not always this behavior is acceptable. In our scenario particular site languages versions were kept in Home item of every page. Basing on that, we are able to make it as a point of truth and during indexing match only proper languages versions to each site.

 

The result will be reduction of unnecessary entries in the index. What will have an influence on time and performance.

 

To achieve this we need to  implement new Crawler which will do new logic. It should inherit form default xCommerce crawler. Take a look below:





Afterwards we need to register this in the index configuration



Thank you :)
8:26 PM

Sitecore xCommerce custom Product Index (9.0.3)

 
 Hi,

Indexing is wide and complex process.  Usually we get default solution to use default indexes, to save our time and effort. Probably in most common scenarios it is sufficient solution. But what when we have a lot of data and we would like to separate our data from default content data or we would like to separate invoking particular object indexing, scale this process etc.

 

 

The best option is to create our own custom index.

This approach is also doable to obtain in xCommerce. What we have to do is to write our own custom patches to switch indexing configuration to ours.


1. Custom Product Index declaration with commerce templates indexing


2. Product Index strategies and crawlers definition for xCommerce

 

3. We have to get rid of the products inside default master_index. It's done to don't keep duplicated data what also will have an influence on index rebuilding process. Especially in time consuming.


4. We have to indicate for xCommerce new index. To make it we need to prepare new Index Resolver with custom values.



Thank you!