Maximum search query limit reached when you link multiple knowledge base spaces
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When linking a service project to multiple knowledge base spaces, in some cases Jira Service Management is unable to use the entire set of linked spaces to perform a search against Confluence Data Center and Server.
Due to this limitation, Jira Service Management can only use a subset of the linked spaces for knowledge base searches.
Environment
This only affects Jira Service Management 5.11 or later when you link to multiple spaces from Confluence Data Center and Server earlier than 8.5.0 LTS.
Diagnosis
If this issue is likely to affect your project, a warning banner saying "Search results may not be exhaustive" as shown below will appear on the Project settings page:
Additionally, there will be a warning message in the logs if Jira Service Management has to drop space keys while building the query string:
Confluence search query would have exceeded 255 character limit, some space keys have been omitted, final spaces query: ...
Cause
Jira Service Management executes knowledge base searches in Confluence on behalf of the user. In Confluence Data Center and Server versions earlier than 8.5.0, a limitation in this knowledge base search functionality prevents Jira Service Management from sending queries that exceed 255 characters to Confluence.
This generally doesn’t cause any issues; however, when you connect multiple spaces, you can quite quickly reach this limit.
The length of the query depends on:
- The number of linked Confluence spaces
- The Confluence space key length
- The search text entered by the user
Workaround
Unlink some Confluence spaces to ensure the query are within the 255-character limit.
Resolution
Upgrade Confluence to version 8.5.0 or later.