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

      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

            [CONFSERVER-94193] SearchManager#search(com.atlassian.confluence.search.v2.ISearch) will sometimes return duplicate results

            A fix for this issue is available in Confluence Server and Data Center 8.5.14
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Akshay Rai added a comment - A fix for this issue is available in Confluence Server and Data Center 8.5.14 Upgrade now or check out the Release Notes to see what other issues are resolved.

            A fix for this issue is available in Confluence Data Center 9.0.1.
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            James Whitehead added a comment - A fix for this issue is available in Confluence Data Center 9.0.1. Upgrade now or check out the Release Notes to see what other issues are resolved.

            Hi,

            we've opened the ticket https://support.atlassian.com/requests/CSP-326487/

            Thanke for your help

            Sébastien GAYOU added a comment - Hi, we've opened the ticket https://support.atlassian.com/requests/CSP-326487/ Thanke for your help

            Thomas Rogozinski added a comment - - edited

            Thanks for reaching out.

            We have retested Confluence 8.5.12 for the issue reported in this ticket and can confirm it has been fixed.

            It seems like we might have been dealing with overlapping problems here and only one has been resolved. Would you be so kind to open a ticket at https://support.atlassian.com/contact/ so we can investigate it further with your particular environment and experience.

             

            Regards,

            Thomas

            Thomas Rogozinski added a comment - - edited Thanks for reaching out. We have retested Confluence 8.5.12 for the issue reported in this ticket and can confirm it has been fixed. It seems like we might have been dealing with overlapping problems here and only one has been resolved. Would you be so kind to open a ticket at https://support.atlassian.com/contact/ so we can investigate it further with your particular environment and experience.   Regards, Thomas

            good morning,

            we have updated our Confluence instance DC to version 8.5.12.
            However, we still have duplicates in our searches.
            can you check the resolution of this case

            Sébastien GAYOU added a comment - good morning, we have updated our Confluence instance DC to version 8.5.12. However, we still have duplicates in our searches. can you check the resolution of this case

            Akshay Rai added a comment -

            A fix for this issue is available in Confluence Server and Data Center 8.9.4
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Akshay Rai added a comment - A fix for this issue is available in Confluence Server and Data Center 8.9.4 Upgrade now or check out the Release Notes to see what other issues are resolved.

            Akshay Rai added a comment -

            A fix for this issue is available in Confluence Server and Data Center 8.5.12
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Akshay Rai added a comment - A fix for this issue is available in Confluence Server and Data Center 8.5.12 Upgrade now or check out the Release Notes to see what other issues are resolved.

            Hi,

            There are a workaround :

            You can use the dark feature "sd.use.confluence.v2.search.disabled" to use the previous class of knowledge base search, go to the dark feature page <jira-url>/secure/admin/SiteDarkFeatures!default.jspa and enable that flag.

            Sébastien GAYOU added a comment - Hi, There are a workaround : You can use the dark feature "sd.use.confluence.v2.search.disabled" to use the previous class of knowledge base search, go to the dark feature page <jira-url>/secure/admin/SiteDarkFeatures!default.jspa and enable that flag.

            This affect us also,

            We try to educate our users about searching and consulting knowledge documents, and this adds a level of difficulty to the implementation and acceptance of this way of working.

            Carmen Nadeau added a comment - This affect us also, We try to educate our users about searching and consulting knowledge documents, and this adds a level of difficulty to the implementation and acceptance of this way of working.

            Sébastien GAYOU added a comment - - edited

            Hello,

            we've just tested the searchV2 API by converting it to JSON, and I end up with a duplicate
            On the other hand, in other tests we've realized that if :

            • the search is for a word in the title, I get a duplicate
            • the search is for a word in a label, I get a duplicate
            • the search is for a word present only in the page content I have no duplicates

            hope this helps with the analysis

            Sébastien

            Sébastien GAYOU added a comment - - edited Hello, we've just tested the searchV2 API by converting it to JSON, and I end up with a duplicate On the other hand, in other tests we've realized that if : the search is for a word in the title, I get a duplicate the search is for a word in a label, I get a duplicate the search is for a word present only in the page content I have no duplicates hope this helps with the analysis Sébastien

              a9293dbdc671 Thomas Rogozinski
              ephillips@atlassian.com Edward
              Affected customers:
              14 This affects my team
              Watchers:
              23 Start watching this issue

                Created:
                Updated:
                Resolved: