In our env, we use GitLab as ALM and we got an error “An error has occurred. Please contact your administrator” on “Issues” tab. The problem is similar to the one described here https://community.sonarsource.com/t/too-many-clauses-maxclausecount-is-set-to-1024/ but in our case user could have more then 1024 groups.
- versions used SonarQube 8.5.1 (build 38104)
In web server log:
Caused by: org.elasticsearch.common.io.stream.NotSerializableExceptionWrapper: too_many_clauses: maxClauseCount is set to 1024
at org.apache.lucene.search.BooleanQuery$Builder.add(BooleanQuery.java:114)
Broken request:
Caused by: org.elasticsearch.index.query.QueryShardException: failed to create query: {
"bool" : {
"must" : [
{
"match_all" : {
"boost" : 1.0
}
}
],
"filter" : [
{
"bool" : {
"must" : [
{
"term" : {
"indexType" : {
"value" : "issue",
"boost" : 1.0
}
}
},
{
"has_parent" : {
"query" : {
"bool" : {
"filter" : [
{
"bool" : {
"should" : [
{
"term" : {
"auth_allowAnyone" : {
"value" : true,
"boost" : 1.0
}
}
},
{
"term" : {
"auth_userIds" : {
"value" : "AXRTfcB-lA3CYH4NGKhe",
"boost" : 1.0
}
}
},
...................
{
"term" : {
"auth_groupIds" : {
"value" : "AXYtqg1T_EIXCvHvjCti",
"boost" : 1.0
}
}
}
],
"adjust_pure_negative" : true,
"boost" : 1.0
}
}
],
"adjust_pure_negative" : true,
"boost" : 1.0
}
},
"parent_type" : "auth",
"score" : false,
"ignore_unmapped" : false,
"boost" : 1.0
}
},
{
"bool" : {
"must_not" : [
{
"exists" : {
"field" : "resolution",
"boost" : 1.0
}
}
],
"adjust_pure_negative" : true,
"boost" : 1.0
}
},
{
"term" : {
"isMainBranch" : {
"value" : "true",
"boost" : 1.0
}
}
},
{
"match_all" : {
"boost" : 1.0
}
}
],
"adjust_pure_negative" : true,
"boost" : 1.0
}
}
],
"adjust_pure_negative" : true,
"boost" : 1.0
}
}
Please advise.