Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-94193

SearchManager#search(com.atlassian.confluence.search.v2.ISearch) will sometimes return duplicate results

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 8.0.0, 8.5.4, 8.6.2
    • Search - Core

    Description

      Issue Summary

      com.atlassian.confluence.search.v2.SearchManager#search(com.atlassian.confluence.search.v2.ISearch) will sometimes return two results for the same page

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Create a page with the title "find" and the content "me"
      2. Run a search using com.atlassian.confluence.search.v2.SearchManager#search(com.atlassian.confluence.search.v2.ISearch) with highlights enabled for the text "find"
        • In 8.5.0 this can be tested by using the knowledge-base plugin. You can POST to: <base-url>/rest/knowledge-base/1.0/searchV2 with a payload like
           {"query":"find","startIndex":0,"pageSize":10,"includeArchivedSpaces":false,"highlight":false}
          

      Expected Results

      One result for the "find" page is returned. For example from the knowledge-base plugin:

      {
                  "id": 1572870,
                  "title": "find",
                  "bodyTextHighlights": "",
                  "url": "/display/TEST/find",
                  "contentType": "page",
                  "metadata": {
                      "content-version": "1",
                      "userCanView": "false",
                      "latest-version-id": "1572870"
                  },
                  "spaceKey": "TEST",
                  "spaceName": "test"
      }
      

      Actual Results

      Duplicate results are returned. For example from the knowledge-base plugin:

              {
                  "id": 1572870,
                  "title": "find",
                  "bodyTextHighlights": "",
                  "url": "/display/TEST/find",
                  "contentType": "page",
                  "metadata": {
                      "content-version": "1",
                      "userCanView": "false",
                      "latest-version-id": "1572870"
                  },
                  "spaceKey": "TEST",
                  "spaceName": "test"
              },
              {
                  "id": 1572870,
                  "title": "find",
                  "bodyTextHighlights": "me",
                  "url": "/display/TEST/find",
                  "contentType": "page",
                  "metadata": {
                      "content-version": "1",
                      "userCanView": "false"
                  },
                  "spaceKey": "TEST",
                  "spaceName": "test"
              },
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ephillips@atlassian.com Edward
              Votes:
              10 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated: