-
Bug
-
Resolution: Unresolved
-
Low
-
2
-
Severity 3 - Minor
-
0
Summary
After renaming a space via a REST API call, the space reference in the search results shows the space name before a rename.
Steps to Reproduce
1. Create a new space called "[TEMP PREFIX] Test Cache Space 1"
curl --request POST \ --url '<instance>/wiki/rest/api/space' \ --header 'Content-Type: application/json' \ --data '{ "key": "TPTCS1", "name": "[TEMP PREFIX] Test Cache Space 1" }' \ --user <email>:<token>
2. Copy a page to the new space
curl --request POST \ --url '<instance>/wiki/rest/api/content/<sourcePageId>/pagehierarchy/copy' \ --header 'Content-Type: application/json' \ --data '{ "copyAttachments": true, "copyPermissions": true, "copyProperties": true, "copyLabels": true, "destinationPageId": "<targetSpaceHomePageId>" }' \ --user <email>:<token>
3. Rename the space to "Test Cache Space 1"
curl --request PUT \ --url '<instance>/wiki/rest/api/space/TPTCS1' \ --header 'Content-Type: application/json' \ --data '{ "name": "Test Cache Space 1" }' \ --user <email>:<token>
Expected Results
The search results show the renamed space as space name so "Test Cache Space 1" in our example.
Actual Results
The search results show the space name before the rename.
The screenshots show that the space name is "[TEMP PREFIX] Test Cache Space 1" in both the quick search and the advanced search results:
Notes
The same steps performed in the UI will show the renamed space name in the search results.
This happens because the space name is indexed at the page level so a re-index of the pages is required for the space name to be updated. This explains why, after modifying a page, a new search will show the correct space name.
Workaround
Please reach out to Atlassian Support by using the following link and ask for a re-index: https://support.atlassian.com/contact/.
Hi 98a43c6ba569,
I've just tried to use the REST APIs to perform a "dummy update" of the title of the page (using the same title already set) and that triggered the re-index of the content of the space name as well. I didn't specifically try with other fields, but any "content level" update will update the space name as well.
Here is, as an example, how I've been updating the page:
As discussed in this thread, there isn't a scheduled reindexing that will occur in Confluence Cloud.