@@ -292,6 +292,7 @@ protected function _prepareIndexTable($entityIds = null)
292
292
*/
293
293
protected function _updateIndex ($ entityIds )
294
294
{
295
+ $ this ->deleteOldRecords ($ entityIds );
295
296
$ connection = $ this ->getConnection ();
296
297
$ select = $ this ->_getStockStatusSelect ($ entityIds , true );
297
298
$ select = $ this ->getQueryProcessorComposite ()->processQuery ($ select , $ entityIds , true );
@@ -314,14 +315,14 @@ protected function _updateIndex($entityIds)
314
315
}
315
316
}
316
317
317
- $ this ->deleteOldRecords ($ entityIds );
318
318
$ this ->_updateIndexTable ($ data );
319
319
320
320
return $ this ;
321
321
}
322
322
323
323
/**
324
324
* Delete records by their ids from index table
325
+ *
325
326
* Used to clean table before re-indexation
326
327
*
327
328
* @param array $ids
@@ -366,6 +367,8 @@ public function getIdxTable($table = null)
366
367
}
367
368
368
369
/**
370
+ * Get status expression
371
+ *
369
372
* @param AdapterInterface $connection
370
373
* @param bool $isAggregate
371
374
* @return mixed
@@ -391,6 +394,8 @@ protected function getStatusExpression(AdapterInterface $connection, $isAggregat
391
394
}
392
395
393
396
/**
397
+ * Get stock configuration
398
+ *
394
399
* @return StockConfigurationInterface
395
400
*
396
401
* @deprecated 100.1.0
@@ -406,6 +411,8 @@ protected function getStockConfiguration()
406
411
}
407
412
408
413
/**
414
+ * Get query processor composite
415
+ *
409
416
* @return QueryProcessorComposite
410
417
*/
411
418
private function getQueryProcessorComposite ()
0 commit comments