Forums

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

Using the Confluence API how can I mimic the response set I get from the UI

Sean Coleman
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!
October 5, 2021

I am looking to use the Confluence API to search for a term or phrase and the results I am getting back are in a very different order than when I perform the same search in the Confluence UI.

 

I am searching for the phrase and I only want to search pages and blogs


agile scrum team

 

So I am passing 

( text~"agile" OR text~"agile*" OR text~"scrum" OR text~"scrum*" OR text~"teams" OR text~"teams*" ) and type IN (page,blogpost) and space.type!="personal"


But the result set order is extremely different than when I search through the UI.

 

What can I do to mimic the sort order and relativity rankings that are present in the UI?

 

Thank you

1 answer

0 votes
marc -Collabello--Phase Locked-
Community Champion
October 6, 2021

@Sean Coleman You can order CQL results in ascending or descending order.  For more information see https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/#order-by .

Sean Coleman
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!
October 6, 2021

Thank you.  Is there anything beyond that?  Right now the relevance is the issue.

If I search for <string> and I have a page titled <string> with the <string> used through the page it isn't in the first 50 results from the API but in the UI it's the first.


Suggest an answer

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

Atlassian Community Events