The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence Search API returning irrelevant results

Kaleb Riley
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 9, 2024

When searching using our Confluence API for terms like "Lucas", the results generated include Lucas, but also highlight "E" in standalone results as well as results including Lucas. Even though there is no "E" in the search term, "E" is being highlighted by the API. This is the case in many searches such as "test", "working" also highlights the word "current" on occasion as well. In short, our confluence API is returning irrelevant results primarily "E" and "current" when neither are remotely close to the search term.

https://developer.atlassian.com/cloud/confluence/performing-text-searches-using-cql/

This is the link we've been following for advanced search queries. If there is a more updated one or alternative please let me know.

 

Curl and response below

curl --request GET \
--url 'https://[OUR-COMPANY].atlassian.net/wiki/rest/api/search?=&cql=text~%22Lucas*%22&limit=1' \
--header 'Authorization: Basic --omitted--'


{
"results": [{
"content": "omitted for brevity",
"title": "omitted for brevity",
"excerpt": "Unrelated content @@@hl@@@E@@@endhl@@@", // here is the problem, why is E highlighted?
"url": "omitted for brevity",
"resultGlobalContainer": "omitted for brevity",
"breadcrumbs": "omitted for brevity",
"entityType": "content",
"iconCssClass": "omitted for brevity",
"lastModified": "omitted for brevity",
"friendlyLastModified": "omitted for brevity",
"score": 0.0
}],
"start": 0,
"limit": 1,
"size": 1,
"totalSize": 38,
"cqlQuery": "text~\"Lucas*\"",
"searchDuration": 267,
"_links": "omitted for brevity"
}

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Fabio Racobaldo _Catworkx_
Community Champion
April 18, 2026

Hi @Kaleb Riley  and welcome,

is the result equals to a search via UI?

Fabio

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events