Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-22949

Solr index synchronization on startup doesn't remove deleted objects, object properties or attachments

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 14.10
    • Search - Solr
    • None
    • Unknown

    Description

      Steps to reproduce:

      1. Create a document and add a comment on it with some unique word in it.
      2. 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.
      3. 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            MichaelHamann Michael Hamann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: