Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-66503

Search returns deleted page links when users imported the site/space twice

XMLWordPrintable

      Issue Summary

      When performing a search after a page title, we have noticed that there are two links returned, one is the correct page link, but there is also a second page link which returns a Page Not found error. This issue only happened during migration from server to cloud, and only when the users migrated their site/space twice. The first import is a test run, so users deleted the spaces for the first import, they imported the space again, and the search results now contain deleted page links from the first import.

      Environment

      Atlassian Cloud

      Steps to Reproduce

      1. Import a Confluence space with multiple pages as a test 
      2. Delete the space
      3. Import again the space
      4. Search after a page title
      5. Notice that two links are displayed

      Expected Results

      Search should return only relevant page links, not the deleted page links

      Actual Results

      The search results contains also cache deleted pages from previous imports.

      Notes

      We have noticed that even if we run a Content indexing and Clear cache for the site, the issue still persists.

      Workaround

      Please contact support to open a request for CSRE. They have permission to run Elasticsearch query and update the sequence in the database

      • Run an Elasticsearch query to find out the max version in the index. Send POST query to [http://|http:]{confluence_hostname}:9200/csp_{confluence_shard_name}_confluence_2/_search. Body:
      {  
          "size":0,
          "query":{
            "term": {
              "tenantId": $tenant_Id
            }
          },
          "aggs" : {
              "max_version" : { "max" : { "field" : "_version" } }
          }
      }
      • Bump the document_version_seq to max version in the index + 1. For example, if the max _version field in the index is 4301, then we will need to update the document_version_seq to version 4302
      • SELECT last_value FROM document_version_seq;
        
      • SELECT setval('document_version_seq', 111, true);
        
      • Run re-index again.

       

      Reproduction Steps for Local Test Environment

      https://jira.atlassian.com/browse/CONFCLOUD-66503?focusedCommentId=1987987&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1987987

       

      Root Cause:

      https://jira.atlassian.com/browse/CONFCLOUD-66503?focusedCommentId=1988042&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1988042

              rluo@atlassian.com Russell Luo (Inactive)
              rscripcaru Ramona Scripcaru
              Votes:
              2 Vote for this issue
              Watchers:
              14 Start watching this issue

                Created:
                Updated:
                Resolved: