Hello,
We have noticed that searches performed via the Confluence UI provide more accurate results than those performed using the search REST API. I took a look at what the Confluence UI is doing when performing search, and found the following API being used:
POST https://x.atlassian.net/gateway/api/xpsearch-aggregator/search/v2/advanced
{
"pagination": {
"limit": 25
},
"query": "health",
"filters": [
{
"@type": "labels",
"labels": [
"condoc"
]
}
],
"cloudId": "removed",
"scope": "confluence.page"
}
The results for this call are significantly more accurate than if we attempt the same search via the documented search API:
GET https://x.atlassian.net/wiki/rest/api/content/search?cql=type=page and label=condoc and text~"health"
Is the /gateway/api/xpsearch-aggregator/search/v2/advanced API okay to consume via REST, or is the interface subject to change without notice? Alternately, is there a way to get the /wiki/rest/api/content/search to perform like the former?
Thanks!
-Kyle
Community moderators have prevented the ability to post new answers.
Were you able to figure out how to return the proper results using the search REST API?
Using the Confluence UI, I can return the results that I want, but using the same search terms via the REST API doesn't.
Unfortunately not.
We've since moved over to retaining our own index using Algolia.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.