Add _shards to Search result type#15
Merged
rusty-key merged 1 commit intoahrefs:masterfrom Mar 2, 2026
Merged
Conversation
Include shard failure info (total, successful, skipped, failed) as an optional field in the generated ATD result type for Search queries, enabling typed access to shard failure data instead of manual JSON parsing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rusty-key
approved these changes
Mar 2, 2026
Atlas07
added a commit
to Atlas07/esgg
that referenced
this pull request
Mar 6, 2026
The _shards type was added to search results in PR ahrefs#15 but the test expected outputs were not regenerated. Update all test output.atd files to match the current code generation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rr0gi
pushed a commit
that referenced
this pull request
Mar 9, 2026
The _shards type was added to search results in PR #15 but the test expected outputs were not regenerated. Update all test output.atd files to match the current code generation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
total,successful,skipped,failed) as an optional field in the generated ATD result type for Search queries?_shards: _shards nullable) so existing code only needs; _in pattern matchesContext
ES can return HTTP 200 with partial results when some shards fail (e.g. memory limits). Currently consumers have to manually parse
_shardsfrom raw JSON before calling the ATD-generated parser, resulting in double parsing. With this change,_shardsis part of the typed result.