Skip to content

too_complex_to_determinize_exception is thrown in a few cases due to the patterns in index template #127972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pawankartik-elastic opened this issue May 9, 2025 · 1 comment
Labels
>bug :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch

Comments

@pawankartik-elastic
Copy link
Contributor

Elasticsearch Version

9.0.0 ECH

Installed Plugins

No response

Java Version

bundled

OS Version

Elastic Cloud

Problem Description

After an upgrade to Elastic v9.0.0, a user reported that they were encountering too_complex_to_determinize_exception error for the index patterns in PUT _index_template/logs-production.

At the moment, we've communicated a workaround: either simplify the patterns or split the patterns across 2 templates. However, we'll need a proper fix for this.

Looking at the commit history, this error is coming from the changes introduced in Lucene 10 upgrade: #114741, i.e. due to Operations.determinize(Operations.union(automata), Operations.DEFAULT_DETERMINIZE_WORK_LIMIT) in Regex#simpleMatchToAutomaton().

Link to the SDH: https://github.com/elastic/sdh-elasticsearch/issues/8947.

Steps to Reproduce

Here's an example:

PUT _index_template/logs-production
{
  "index_patterns": [
                    "*haproxy-production*",
                    "*postgres-production*",
                    "*psql_slow_query-production*",
                    "*springboot-production*",
                    "*tomcat-production*",
                    "*security-security*",
                    "*alerts-monitoring*"
  ],
  "template": {
    "settings": {
      "index": {
        "lifecycle": {
          "name": "logs-production"
        },
        "codec": "best_compression",
        "query": {
          "default_field": [
            "message"
          ]
        }
      }
    }
  },
  "composed_of": [
    "logs-mappings",
    "data-streams-mappings"
  ]

Logs (if relevant)

No response

@pawankartik-elastic pawankartik-elastic added >bug Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch :Search Foundations/Search Catch all for Search Foundations labels May 9, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

@pawankartik-elastic pawankartik-elastic changed the title too_complex_to_determinize_exception is now throw in a few cases in index template's patterns after upgrade to Lucene 10 too_complex_to_determinize_exception is thrown in a few cases due to the patterns in index template May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch
Projects
None yet
Development

No branches or pull requests

2 participants