-
Bug
-
Resolution: Fixed
-
High
-
None
-
Severity 3 - Minor
Issue Summary
The Confluence serch endpoint /wiki/rest/api/search?cql= doesn't work well in case we add a limitation in the search - the top results will be 250.
Steps to Reproduce
- Create around 1000 of pages on a space (you can use the below script)
#!/bin/bash UIDPAS='EMAIL_ADDRESS:API_TOKEN' space='SPACEKEY' site='https://SITENAME.atlassian.net/wiki' totalpage=1000 for ((i=1;i<=$totalpage;i++)); do echo $i curl -u $UIDPAS -X POST -H 'Content-Type: application/json' -d '{"type":"page","title":"Test API page '$i'","space":{"key":"'$space'"},"body":{"storage":{"value":"<p>This is a page created from an API call, later this page will be queried out via the TEST API.</p>","representation":"storage"}}}' $site/rest/api/content done
- Once all the pages are created, run this endpoint on the browser: https://SITENAME.atlassian.net/wiki/rest/api/search?cql=title~page?&limit=1000&start=0
Expected Results
With no pagination, it should return all the 1000 pages we just created (as well as other pages with "page" on their title.
Actual Results
It only shows 250 results, even the totalSize field showing the total amount of results.
Notes
- Let's say you then try to get &limit=1000&start=250, it still won't show the expected number of results in the page.
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available