elasticsearch-reindex
Skill by elastic
Guides Elasticsearch reindex work through the elastic CLI, covering local and remote copies, slicing, throttling and task tracking. Built for engineers who copy or migrate indices, change mappings, or transform documents during a reindex.
Install elasticsearch-reindex
Built from the published package, never by AI.
git clone --depth 1 https://github.com/elastic/agent-skills /tmp/agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agent-skills/skills/elasticsearch/elasticsearch-reindex ~/.claude/skills/elasticsearch-reindexRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/elastic/agent-skills /tmp/agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/agent-skills/skills/elasticsearch/elasticsearch-reindex ~/.gemini/antigravity-cli/skills/elasticsearch-reindexAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install elasticsearch-reindex in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill walks an assistant through copying documents from source indices or data streams to a destination with the Elasticsearch _reindex API. It runs the work through the elastic CLI and follows a fixed process. The assistant confirms the deployment type, chooses local or remote reindex, inspects the source mapping and count, and creates the destination index before copying.
Large copies run asynchronously with wait_for_completion=false, and the assistant polls the task until it completes. It can tune batch size, slicing and throttling, and it verifies the exact document count on the destination before reporting results. The skill is aimed at engineers migrating indices, changing mappings, or copying a filtered subset of documents.
Written from the project's SKILL.md and checked against it.
What it can do
- Local reindexCopies documents between indices on the same cluster using source.index and dest.index.
- Remote reindexCopies documents from another cluster using source.remote with the remote URL and credentials.
- Filtered subset copyLimits the copy with a Query DSL filter, such as a timestamp range on @timestamp.
- Destination preparationCreates the destination index with explicit settings and mappings before the copy starts.
- Parallel slicingUses slices=auto to parallelize local reindex per primary shard.
- ThrottlingCaps request rate with requests_per_second and can change it mid-flight with rethrottle.
- Task trackingPolls GET /_tasks/{task_id} and reads status and failures until the task completes.
- Count verificationCompares the exact destination document count with the source filter expectation.
What you need
- elastic CLI version 0.2 or later with stack es support
- Elasticsearch 8.x or 9.x cluster
- Allowlisted remote host for remote reindex on self-managed or Elastic Cloud Hosted
Try asking
- Copy logs-2024 into a new index with a corrected mapping
- Reindex events into events-v2 with auto slicing and a throttle
- Migrate only metrics from the last 30 days to a new index
Good to know
- Remote reindex does not support slicing.
- On Serverless, remote reindex is Tech Preview and works only with Elastic Cloud Hosted remotes.
- On Serverless, tasks can be read by task id only, with no list or cancel.
- The reindex API does not copy mappings, shard counts or analyzers.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/elasticsearch/elasticsearch-reindex/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md13 KB -
references/api-reference.md14 KB -
references/patterns.md15 KB -
references/troubleshooting.md2 KB -
references/tuning.md3 KB
Alternatives to elasticsearch-reindex
All alternatives →Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.
Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.
Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.
Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.
Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.
Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.
Compare with hugging-face-datasets, db-repair or alloydb-basics
elasticsearch-reindex: common questions
Does reindex copy the index mapping?
No. The skill says _reindex does not copy mappings, shard counts, or analyzers, so the destination should be created first with explicit settings and mappings.
Can Elasticsearch reindex from another cluster?
Yes, by adding source.remote with the remote cluster URL and credentials. On self-managed or Elastic Cloud Hosted, the remote host must be allowlisted.
Does this work on Elastic Cloud Serverless?
Local reindex works on all deployment types. Remote reindex on Serverless is Tech Preview and supports Elastic Cloud Hosted remotes only.
How do I install elasticsearch-reindex?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is elasticsearch-reindex free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is elasticsearch-reindex safe to use?
It scores 83 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to elasticsearch-reindex?
Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.
