How to decide between regex and wildcard for a scenario

When we are trying to do a regex on around 10 different terms, we get the following exception:

ElasticsearchException[Elasticsearch exception [type=too_complex_to_determinize_exception, reason=too_complex_to_determinize_exception: Determinizing automaton with 67 states and 278 transitions would result in more than 10000 states.]];

Increasing the boost will resolve the error. But the number of terms passed will differ and cant fix a specific value. I am thinking of using wildcard.

Wildcard also internally creates states, so whether using wild card is a better approach or is there a better way?

My sample query using regex:

search {"from":0,"size":0,"timeout":"60s","query":{"bool":{"must":[{"regexp":{"filed_name":







This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.