maxClauseCount is set to 1024 caused by highlight property

Enonic version: 7.6.0
OS: Ubuntu

I using the query function to make some searches. For some strings that I search I got the following sequence of errors:

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

If I remove the highlight property it works as intended. Do you know how I could fix that?

The highlight property:

highlight: {
    order: 'score',
    fragmentSize: 150,
    noMatchSize: 100,
    numberOfFragments: 1,
    preTag: '<span class="mark">',
    postTag: '</span>',
    requireFieldMatch: false,
    properties: {
        data.body': {}

PS: I’m using “count: 10” for the query.

Unfortunately it seems like a problem addressed only in ES 5.x

1 Like