Removing a huge amount of content objects in one go leads to serious Solr index inconsistencies. The plausible reason is the fact that eZ Platform sends separated document removal request for each content objects.
Steps to reproduce
- Install clean eZ Platform,
- Configure Solr (ref: https://doc.ezplatform.com/en/2.4/guide/solr/)
- Set following values in solrconfig.xml to let Solr index immediately:
- Create a folder, for instance, Test under the project root folder,
- Create 3000 folder objects under the parent created in the previous step,
- Go to project root folder,
- Select Test folder from the sub-items list and click on remove,
- Confirm bulk removal,
- Go to Content structure -> Search, from filters list select Folder and perform search.
- On the result list you should see a lot of results (in my test case around 2k)
- Go to trash, click on Empty trash,
- Repeat step 9. You should still see lots of contents. If you try to go to the content preview, you should see 404 page.
Not all of the content objects are removed from the search index.
All of the content objects should be removed from the search index.
**Current implementation triggers sending HTTP requests to Solr on kernel.terminate what should probably be changed.