Confluence Cloud Search API - score always 0 for results

Andrea Rinaldi
Contributor
February 9, 2022

Hi guys,

I’m approaching Confluence Cloud Rest APIs and I cannot understand how the /search API works… As described in the documentation (here) it should return a set of results with the `score` property, but it’s always zero.

I tried to look in the docs for more detailed info, but I wasn’t able to find anything useful.

Any hint?
Thank you in advance.

Regards,
Andrea

1 answer

0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 14, 2022

Hi @Andrea Rinaldi ,

first of all, just a simple question : are u sure that user used for seach API has privileges to retrieve expected results?

Please could you share the URL? I'd like to check the cql in order to verify that it is correct. In particular I'd like to check character encoding (I usually use the following https://www.urlencoder.org/ to check rest API parameters).

Hope this helps,

Fabio

Andrea Rinaldi
Contributor
February 14, 2022

Hi @Fabio Racobaldo _Herzum_ , thank you for answering.

We are using the ACT_AS_USER scope in our ACE app and we are doing search requests with a bearer token that identifies the current logged user.

Anyway, we receive the pages we are expecting, it doesn't seem a matter of wrong CQL.. The problem is that the returned JSON items (see SearchResult object model in the linked doc) do not contain the 'score' property mentioned in the doc.

We are trying to merge the results of the Confluence Search API with the results we get from other sources.. and the score parameters would be very useful in the normalisation phase. Do you know if there's some particular condition or setting in Confluence that would enable the 'score' property evaluation?

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 14, 2022

Sorry @Andrea Rinaldi for the misunderstanding. 

Score property should be associated to age of pages (I read that info here).

Did you check if your items are referred to just old pages?

Ciao,

Fabio

Andrea Rinaldi
Contributor
February 15, 2022

Yep, we read that page too, the explanation is clear enough..

It's disappointing that the "score" property is listed in the documentation without any sort of note or disclaimer, but it never gets evaluated and properly returned.

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 15, 2022

Ciao @Andrea Rinaldi ,

you can raise a ticket to Atlassian team https://support.atlassian.com/contact/

Andrea Rinaldi
Contributor
February 15, 2022

Yes, we are raising it right now.

Thank you @Fabio Racobaldo _Herzum_ !

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 15, 2022

You're welcome @Andrea Rinaldi 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events