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"
}

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events