Tree mode error when listing to many contents

Enonic version: 7.4.1
OS: Ubuntu

I am receiving an error when clicking in a content that has too many child contents in the tree mode selection, in the error log it shows the following:

**com.enonic.xp.repository.IndexException: Search request failed after [30s], query: **
Caused by: all shards failed
Caused by: org.elasticsearch.ElasticsearchException$1: maxClauseCount is set to 1024

PS: I selected the most important parts of the log.

One way to access the tree mode feature is when we create a link to a content.
tree mode

There is already an issue for this problem apparently:


Thanks for the answer @tsi .