Error Preventing Viewing Comments Caused By "Clause Count Elasticsearch Error"
Problem: The following error prevents viewing comments on the Tamr UI. The elasticsearch-procurify.log shows that the "All shards failed Error" caused by "TooManyClauses: maxClauseCount is set to 4096":
[2020-06-30T13:45:16,313][DEBUG][o.e.a.s.TransportSearchAction] [localhost] All shards failed for phase: [query]
org.elasticsearch.index.query.QueryShardException: failed to create query: {
"bool" : {
"should" : [
{
"bool" : {
"must" : ...
...}
Caused by: org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 4096
at org.apache.lucene.search.BooleanQuery$Builder.add(BooleanQuery.java:114) ~[lucene-core-7.7.0.jar:7.7.0 8c831daf4eb41153c25ddb152501ab5bae3ea3d5 - jimczi - 2019-02-04 23:16:28]
at org.apache.lucene.search.BooleanQuery$Builder.add(BooleanQuery.java:127) ~[lucene-core-7.7.0.jar:7.7.0 8c831daf4eb41153c25ddb152501ab5bae3ea3d5 - jimczi - 2019-02-04 23:16:28]
at org.elasticsearch.index.query.ExistsQueryBuilder.newObjectFieldExistsQuery(ExistsQueryBuilder.java:208) ~[elasticsearch-6.8.2.jar:6.8.2]
at org.elasticsearch.index.query.ExistsQueryBuilder.newFieldExistsQuery(ExistsQueryBuilder.java:195) ~[elasticsearch-6.8.2.jar:6.8.2]
Cause: The issue occurs if we have a high number of comments for a project in Tamr.
Resolution: To work around the issue, increase the TAMR_ES_MAX_CLAUSE_COUNT to 100,000 and restart Tamr and Tamr dependencies.
If the issue still persists, increase to a higher value such as 200,000.
It might also require an increase in the ES_HEAP_SIZE.
Check out the public docs for more information on setting configuration variables.
Updated over 2 years ago