Skip to content

feat: add scroll-search helper command#123

Merged
JoshMock merged 4 commits into
mainfrom
helpers/scroll-search
Apr 13, 2026
Merged

feat: add scroll-search helper command#123
JoshMock merged 4 commits into
mainfrom
helpers/scroll-search

Conversation

@flobernd
Copy link
Copy Markdown
Member

Summary

  • Add elastic es helpers scroll-search command for scrolling through all search results
  • Streams documents as NDJSON to stdout with automatic scroll context lifecycle management
  • Supports query input via --query (inline JSON), --input-file, or stdin
  • Configurable --scroll duration, --size per batch, and --max-docs limit
  • Always clears scroll context on completion or error (finally block)
  • Writes progress summary to stderr

Depends on #118

…ion)

Extract error utilities into shared `src/es/errors.ts` so both the
existing ES handler and new helper commands can reuse them. Add shared
helper utilities (NDJSON parsing, bulk body builder, retry with backoff,
concurrency runner, progress reporter, glob file discovery) and register
an empty `helpers` group under the `es` command tree.
Add `elastic es helpers scroll-search` for scrolling through all search
results with automatic scroll context lifecycle management.

Streams documents as NDJSON to stdout, supports --query, --input-file,
configurable --scroll duration, --size per batch, and --max-docs limit.
Always clears scroll context on completion or error.
Base automatically changed from helpers/foundation to main April 13, 2026 16:30
Sending JSON-formatted errors to stderr happened in an upstream commit
and broke the tests.
@JoshMock JoshMock enabled auto-merge (squash) April 13, 2026 19:17
@JoshMock JoshMock merged commit 21573db into main Apr 13, 2026
16 checks passed
@JoshMock JoshMock deleted the helpers/scroll-search branch April 13, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants