Hi,
when I create content in the legacy backend using multiupload the new contents are missing in the search index. Those entries are added to the ezpending_actions table because an exception appears:
Could not find 'location' with identifier '3481335'
If you move an object via the legacy stack (for example move an object in the admin backend) the main location is not updated in the Solr index.
The problem is that ezcontentobjecttreenodeoperations.php is using a Database transaction. The reindex is triggered before the changes has been commited to the Database.
We have already created a Ticket in the eZ Systems Jira but because of this extension they closed it as "Won't fix": https://jira.ez.no/browse/EZP-26522
Relying on "search_engine" parameter is sub optimal for several reasons:
upgrades from 5.4 and 2014.11 won't have it
a customer project with more complex setup might not use it at all as it is not multi repo friendly if you use solr for one and legacy for another one for instance.
So would be more reliable to check that Search engine handler is, or is not LegacySearchEngine instance depending on case.
When copying content in the admin, the function addObject() fails. It looks like this is because eZ, in the legacy kernel, triggers the addObject() before the new location has been committed to the database. The eZPlatformSearch plugin seems to require that objects exist in the database in order for the addObject function to work (https://github.com/netgen/ezplatformsearch/blob/master/search/plugins/ezplatformsearch/ezplatformsearch.php#L80).
During restoring Content from trash, addObject() method will be called from inside of transaction (see content/publish operation here).
That means Search Engine in new stack will not have restored Location(s) available for indexing.