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

On restart, documents to re-index aren't correctly computed

    XMLWordPrintable

Details

    • Integration
    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce:

      Unfortunately, this issue has no easy steps to reproduce. Basically, to reproduce, some documents need to exist in the database but not in the search index (or vice-versa). For example, in a space that has a child space, create a document that is alphabetically after all other documents and prevent that document from being indexed in Solr.

      Expected result:

      On restart, XWiki re-indexes just the added document.

      Actual result:

      On restart, XWiki re-indexes also the whole nested space and not just the added document.

      The reason for this is that the comparator that is used internally for merging the results from the database and Solr sorts nested spaces first while both Solr and the database sort the nested spaces last. There are further differences, this can be seen with an integration test that checks if the sort order that is returned by Solr or the database is consistent with the used comparator.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: