Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
14.10
-
None
-
Unknown
-
Description
Steps to reproduce:
- Create a document and add a comment on it with some unique word in it.
- Delete the comment while preventing the Solr index to be updated. A way is to attach a debugger and put a break point org.xwiki.search.solr.internal.SolrIndexEventListener#onEvent and to prevent the execution of the listener by doing a "force return" whenever the method is called. Another way could be to unregister this event listener.
- Restart XWiki.
Expected result:
On startup, a message "IndexerJob - 0 documents
added, 0 deleted and 1 updated during the synchronization of the Solr index." is logged and when searching for the unique word without "Result type" filter, no documents are found.
Actual result:
While the message is logged as expected, the object can still be found in the Solr search:
This is because the synchronization on startup only compares documents and not object or object properties. While it triggers a recursive update of the documents, this update doesn't delete anything so objects and properties that don't exist anymore in the database aren't removed from the index.