Executing a search query with 30K+ clauses

Viewed 28

I am interested in executing an Elasticsearch search query with 5000+ terms across 5 different fields which leads to 25K+ clauses. According to documentation default max_clause_count limit is set to 1024 and updating this limit to 30K doesn't work as expected.

Can anyone please suggest an efficient alternative to execute this query?

Thanks.

Sample query:

    "query":{
        "bool":{
            "should":[
                {
                    "match_phrase_prefix":{
                        "field_1": "term_1"
                    }
                }
                .
                .
                .
                {
                    "match_phrase_prefix":{
                        "field_1": "term_5000"
                    }
                },
                {
                    "match_phrase_prefix":{
                        "field_2": "term_1"
                    }
                }
                .
                .
                .
                {
                    "match_phrase_prefix":{
                        "field_2": "term_5000"
                    }
                }
                .
                .
                .
            ]
        }
    }
0 Answers
Related