refactor search source warnings to return a single warning for 'is_partial' results #164905
Labels
discuss
impact:needs-assessment
Product and/or Engineering needs to evaluate the impact of the change.
loe:needs-research
This issue requires some research before it can be worked on or estimated
Team:DataDiscovery
Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Team:SharedUX
Team label for AppEx-SharedUX (formerly Global Experience)
technical debt
Improvement of the software architecture and operational architecture
extractWarnings creates an array of warnings from an elasticsearch
_search
response. The current implementation creates a warning per shard error.This implementation creates the following problems:
a) shard warning contains state about an instance of one shard failure. This is ok.
b) shard warning
message
field contains messaging about all shard failures. For example "{shardsFailed} of {shardsTotal} shards failed". This is bad and is a code smell that signals that the data modeling is not a good fit for the use case.a) lens
b) discover
I propose a different data model. Instead of producing a warning per shard error, produce a single warning for "incomplete data". This single warning can contain details of shard failures, shard time outs, and skipped clusters. On the UI side, the user will see a single warning saying "The data might be incomplete or wrong". As a secondary part, the the warning details will show "{shardsFailed} of {shardsTotal} shards failed", "{shardsTimedout} of {shardsTotal} shards timed out", and "{clustersFailed} of {clustersTotal} clusters failed". Allowing users to explore the detailed reasons why their is incomplete data.
The text was updated successfully, but these errors were encountered: