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

SearchManager#search(com.atlassian.confluence.search.v2.ISearch) does not return matching results

XMLWordPrintable

      Issue Summary

      com.atlassian.confluence.search.v2.SearchManager#search(com.atlassian.confluence.search.v2.ISearch) does not return results when the search query contains additional words that do not exist in page title/content

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Create a page with the title "How to approve" and the content "approval process"
      2. Run a search using com.atlassian.confluence.search.v2.SearchManager#search(com.atlassian.confluence.search.v2.ISearch) with highlights enabled for the text "How to approve travel"
        • In 8.5.0+ versions 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":"How to approve travel", "startIndex":0, "pageSize":10, "type":"page", "includeArchivedSpaces":false, "highlight":true }

      Expected Results

       

      {
        "results": [
          {
            "id": 393236,
            "title": "@@@hl@@@How@@@endhl@@@ to @@@hl@@@approve@@@endhl@@@",
            "bodyTextHighlights": "",
            "url": "/display/TEST/How+to+approve",
            "contentType": "page",
            "metadata": {
              "content-version": "1",
              "userCanView": "true",
              "latest-version-id": "393236"
            },
            "spaceKey": "TEST",
            "spaceName": "TEST"
          }
        ],
        "total": 1
      } 

      Actual Results

      {
        "results": [],
        "total": 0
      } 

       

      Workaround

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

              a9293dbdc671 Thomas Rogozinski
              2fd79d2463e6 Haribaskar Govindasamy
              Votes:
              2 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: