OpenMetadata
OpenMetadata copied to clipboard
Metric Search Indexing Failure: 500 Error with "too many nested clauses" Exception
Problem
Metric search is not working as expected, causing search failures and inability to discover assets.
Symptoms
-
Search bar behavior:
- Searching for metrics with names longer than 10-12 characters returns "no result found" even after indexing completes
- Example: Searching "AcceleratedConnection WBA Ethernet ServiceLevel 1" returns no results
-
500 Server Error:
- When the Metric filter is selected in the dropdown, searching the same string triggers a 500 error with exception:
too_many_nested_clauses: Query contains too many nested clauses; maxClauseCount is set to 1024- Error occurs at OpenSearch endpoint:
POST /metric_search_index/_search
When Metrics DO Appear
- Explore → Dropdown tree navigation
- When searching with only the first ~10-11 characters of the metric name
- When navigating directly from the Metrics page
When Metrics DO NOT Appear
- Full metric names (>10-12 characters) in the Search bar
- Any search when the "Metric" dropdown filter is selected (500 exception)
Impact
The affected cluster has 206 metrics. Without working search, discovering assets becomes extremely difficult since the metrics page doesn't have search functionality.
Additional Context
- Search reindexing attempted (without auto tune) - did not resolve the issue
- Index mapping suspected as root cause
- Similar nested clause issues may have been addressed in previous fixes
Internal Reference
Slack thread: https://collate-inc.slack.com/archives/C096NDJQAJW/p1772586027962669