Developer forum

Forum » Ecommerce - Standard features » Problem with ProductIndexBuilder bulk size

Problem with ProductIndexBuilder bulk size

Mark Preisler
Reply

Hi

In DW 9.7.2 ProductIndexBuilder there is a small problem with the bulk size handling, this query runs for every batch of products indexed, but the TOP 500 and WHERE ProductAutoId > {CurrentAutoId} is declared before the ORDER BY ProductAutoId and there for it is random how many products you end up with, in the index.

For now we can get around the problem by setting BulkSize to int.maxvalue.

SELECT productautoid, 
       * 
FROM   (SELECT TOP 500 * 
        FROM   ecomproducts 
        WHERE  productexcludefromindex = 0 
               AND productactive = 1 
               AND productautoid > 0 
               AND productid IN (SELECT gpr.groupproductrelationproductid 
                                 FROM   ecomgroupproductrelation gpr 
                   LEFT JOIN ecomgroups g 
                          ON gpr.groupproductrelationgroupid = 
                             g.groupid 
                   LEFT JOIN ecomshopgrouprelation sgr 
                          ON g.groupid = sgr.shopgroupgroupid 
                                 WHERE  sgr.shopgroupshopid = @p0)) AS Products 
       LEFT JOIN ecomproductcategoryfieldvalue 
              ON productid = fieldvalueproductid 
                 AND productvariantid = fieldvalueproductvariantid 
                 AND productlanguageid = fieldvalueproductlanguageid 
ORDER  BY Products.productautoid 
 
 

Replies

 
Steffen Kruse Hansen Dynamicweb Employee
Steffen Kruse Hansen
Reply
This post has been marked as an answer

Hi Mark,

I think this is a known bug (TFS#71369), which has already been fixed in the 9.7.3 hotfix, so if you just upgrade to that version, everything should be working again.

Sorry for the inconvenience.

 

Best regards,
Steffen 

Votes for this answer: 1
 
Mark Preisler
Reply

Thanks that fixed the problem.

 

You must be logged in to post in the forum