I noticed that products I remove from Woocommerce aren’t removed from the index.
When manually triggering (on wp shell)add_remove_document_to_solr_index with the ID of the productthat should be removed, a ‘php notice’ is thrown and the product remains in the index
Notice: Trying to get property ‘post_status’ of non-object in ../plugins/wpsolr-pro/wpsolr/core/wpsolr_include.inc.php on line 157
Notice: Trying to get property ‘post_type’ of non-object in ../plugins/wpsolr-pro/wpsolr/core/wpsolr_include.inc.php on line 162
How does one remove an item from the index that no longer exist in WordPress?
Some of your posts have been deleted, but remain in the index. It can happen when SQL is used to remove posts rather than the standard WP API. Typically, WP All Import does that to speed up deletion, but we have an add-on for this plugin to fix the issue.
In your current state, all you can do is either:
– Delete you index content, and reindex
– Create a new index, index it, and use it in search by selecting it in tab “2.”