0

Can somebody explain how stock index works in Magento 2 and what is it used for and how?

If I set it "index on schedule" what exactly happens and how does it affect the shop if stock index is in "reindex needed" status?

Savan Patel
  • 2,348
  • 1
  • 16
  • 39
Webninja
  • 1,593
  • 2
  • 25
  • 47

1 Answers1

1

"index on schedule" means you need to trigger a reindexing (normaly you do this via crontab) in order to get your indexes up-to-date. I highly reccommend reading https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-cron.html

"reindex needed" means your index tables are out of sync. which means that your shop is not displaying accurate data.

If reindexing is set to "index on schedule" and order comes, is the stock index really out of sync for a while (until next cron runs)...? Is there a possibility that somebody sees the product in stock even if it is out of stock?

Yes.

Philipp Sander
  • 1,723
  • 2
  • 14
  • 27
  • Yes this I know already. But what does it mean if stock index is in need of reindex in techical perspective exactly? If reindexing is set to "index on schedule" and order comes, is the stock index really out of sync for a while (until next cron runs) and what kind of affect does it have on front end? Is there a possibility that somebody sees the product in stock even if it is out of stock? – Webninja Mar 10 '20 at 15:22
  • One more question. Here Marius explains indexing on M1. https://magento.stackexchange.com/questions/22157/how-indexing-works-in-magento/22166#22166 There is Stock Status index mentioned. Do you know if the Magento 2's stock index is the same kind? – Webninja Mar 10 '20 at 18:26
  • 1
    exactly. indexing didn't change that much in general – Philipp Sander Mar 10 '20 at 21:56