need to get more than 10,000 results from web/api/issues/search

1,378 views
Skip to first unread message

mil...@gmail.com

unread,
Sep 20, 2016, 5:15:20 PM9/20/16
to SonarQube
We just updated to SonarQube 6.0. I'm not sure of the previous version (5.something). I have a java program that calls the web/api/issues/search and places the results in a csv file. After the upgrade, I started getting 500 errors when trying to access more than 10000 issues. Here is an example error message:

{"errors":[{"msg":"Fail to execute ES search request '{\"from\":10000,\"size\":500,\"query\":{\"bool\":{\"must\":{\"match_all\":{}},\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"severity\":[\"CRITICAL\",\"INFO\",\"MINOR\",\"MAJOR\",\"BLOCKER\"]}},{\"terms\":{\"project\":[\"AVdIH5nkfnxN3tHk_uuu\"]}},{\"terms\":{\"language\":[\"java\"]}},{\"terms\":{\"type\":[\"CODE_SMELL\"]}},{\"has_parent\":{\"query\":{\"bool\":{\"must\":{\"match_all\":{}},\"filter\":{\"bool\":{\"should\":{\"term\":{\"groups\":\"Anyone\"}}}}}},\"parent_type\":\"authorization\"}},{\"terms\":{\"status\":[\"OPEN\",\"CONFIRMED\",\"REOPENED\"]}}]}}}},\"sort\":[{\"severityValue\":{\"order\":\"asc\",\"missing\":\"_first\"}}]}' on indices '[issues]' on types '[issue]'"}]}


Is there any way to force the api to allow me to download more than 10,000 issues? I've tried reducing the result size by using more filters(language, severity, type, etc...), but I have some results that are still more than 10,000. This wasn't an issue on our previous version. As an example, I was able to pull down 34K of minor css issues via the api. 

Simon Brandhof

unread,
Sep 21, 2016, 3:45:18 AM9/21/16
to mil...@gmail.com, SonarQube
Hi Adam,


Web service should not fail with a 500 HTTP code. That has to be fixed. Still I challenge the functional need for extracting more than 10'000 issues. Can you give details ? Implementation would be tricky as it should not allow to extract all (millions of) issues from database.

Thanks

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/a12dda78-4024-41bb-84f5-41ddc72c4273%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Simon BRANDHOF | SonarSource
Tech Lead & Co-Founder
http://twitter.com/SimonBrandhof

mil...@gmail.com

unread,
Sep 21, 2016, 9:12:08 AM9/21/16
to SonarQube
We have around 50,000 issues reported on a very large application. We have just recently scanned this application for the first time in Sonar. We are starting an effort to clean this up, and want to extract results to excel for a number of reasons. We are sharing results with 3rd parties that don't have permissions to access sonar, we are adding our own custom columns to further sort/filter the results, etc....

stewart....@gmail.com

unread,
Jan 4, 2017, 6:50:51 PM1/4/17
to SonarQube, mil...@gmail.com
Hi Simon,

I would like to echo the need for being able to display more than 10k issues. I have inherited a large legacy application at a very large corporation. I am using a java plugin (3.4) for eclipse utilizing the company's remote Sonar install (4.0). The 'SonarQube Issues' view in eclipse maxes out at 100 instances per issue. This might be workable because as issues are resolved the others will appear. However the total number of issues maxes out at 10,000 which is resulting in about half of the Criticals are not appearing. Can the total number of issues be extended in the SonarQube Issues view so we can get an accurate high level count for each severity (and ideally expand the number of instances as well)?
Reply all
Reply to author
Forward
0 new messages