Closed Fifciu closed 4 years ago
Disabled products are note exported to ES at all. Products with status disabled are automatically removed from ES. I don't plan to change this behavior.
So if I change the product from Enabled to Disable - the product should disappear from ES all together. This is how it works from the beginning. I might check if sth didn't break the meantime.
I just did a quick test - I disable product in Magento backend and it disappears from ES. Before:
After:
can confirm that disabled products are not exported
Hmmm maybe it is related to some of my custom modification... Could you please make sure invalidate cache for just disabled item also works properly? @afirlejczyk @simonmaass
Yes, it is. The request for invalidating cache is sent.
If the moderator disables product after the first reindex - it will not be disabled in the ES. I mean that value of
status
attribute won't be changed to2
(disabled).I believe the source of problem is in the class
StatusSelectModifier
, in this line:You filter products and leave only ones that are enabled. Unfortunately, this way it won't update
status
attribute of products I've just disabled.My quickfix for that was changing line above to the:
Unfortunately, it slows down reindex significantly so I believe there is a better way to fix it. It also does not send invalidate request