elasticsearch-ingest
БесплатноБез исполняемых скриптовНе проверенLoad local CSV, JSON array, and NDJSON files into Elasticsearch indices with the bulk API through the `elastic` CLI, creating an explicit mapping first when…
от elastic★ 615 звёзд на GitHubОб этом скилле
Elasticsearch File Ingest
Load local files into an index with POST /_bulk. The
Bulk API covers the NDJSON
action-and-source format, action semantics, the 100 MB request limit, and the errors/items response. The
mapping overview covers field types and why they can't
change after indexing. This skill holds what those pages and the CLI help don't make obvious. Mapping design for
specific access patterns belongs to the elasticsearch-index-design skill.
Environment Configuration
This skill executes Elasticsearch operations through the elastic CLI. If the
elastic CLI is not installed, tell the user what it is needed for. Do
not guess credentials, call the HTTP API directly, or attempt other workarounds.
This skill references operations in HTTP-shorthand form (e.g., GET /, GET /_cat/indices, GET /{index}/_mapping,
GET /{index}/_settings/index.mode, POST /_query). The Operations table at the end of this document
maps each shorthand to the equivalent elastic CLI command — always use the CLI rather than calling the HTTP API
directly.
Guidelines
- Check the cluster before touching files.
GET /confirms the CLI context works; if it fails, fix configuration before converting or loading anything. - Create the index before the first bulk request when types matter. The first document fixes each field's type
permanently
(dynamic field mapping).
Without a mapping, quoted numbers and booleans become
textwith a.keywordsub-field, quoted ISO dates becomedate, and a numeric column whose first value is0becomeslong, so later12.5values are truncated. Look atGET /{index}/_mappingif the index might exist, thenPUT /{index}withmappings. - The mapping does the typing, not the JSON. With an explicit mapping,
"36"indexes into along(coerce) and"true"into aboolean(boolean). Values that can't be parsed still fail per item:"N/A"in a number,01/15/2023in adatewithout a matchingformat, and empty CSV cells, which arrive as""(that reads asfalsein a boolean field). Send blanks asnullor omit the field. - Let the CLI's bulk-ingest helper parse CSV, JSON arrays, and documents-only NDJSON. The
POST /{index}/_bulkhelper in Operations splits arrays per element, batches by bytes (5 MB default), sends batches in parallel, and retries batches that fail outright. For CSV it turnstrue/falseinto booleans and every numeric-looking cell into a number, which strips leading zeros from ZIP codes and padded IDs whatever the mapping says. Convert such files to NDJSON yourself with those columns kept as strings, then load that. - Send a pre-formed bulk body through
POST /_bulk, not the helper. The helper prefixes every line with anindexaction, so a file that already alternates action and source lines would index its action lines as documents. The CLI takes the body as a JSON file shaped{"operations": [action, source, …]}rather than raw NDJSON; keep each request well under 100 MB. - Use
POST /_bulkwhen the helper's fixedindexaction is wrong. The helper can't set_id, so a rerun duplicates every document. Stable_ids make reloads overwrite instead. Data streams accept onlycreateactions and need a matching index template (use a data stream). - Don't trust a zero exit code. Bulk returns 200 with
errors: truewhen individual items fail, and the helper's summary only countsfaileddocuments without the reasons. Before a full load, send a few documents throughPOST /_bulkand read each item'serror.typeandreason; fix the mapping or the conversion, not the cluster. Back off on429rather than retrying immediately (tune for indexing speed). - Wrong types on an existing index: ask before deleting.
DELETE /{index}destroys data that may not exist anywhere else, so get explicit confirmation in the conversation first. A wrong mapping isn't permission. The non-destructive path is a new index (users-v2) with the right mapping, loaded from the file again (explicit mapping)
Установить elasticsearch-ingest в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл elasticsearch-ingest?
Load local CSV, JSON array, and NDJSON files into Elasticsearch indices with the bulk API through the `elastic` CLI, creating an explicit mapping first when field types matter. Use when batch-importing local files, loading a pre-formed bulk NDJSON body, or verifying document counts and mappings after a load — not for Logstash pipelines, Beats, Elastic Agent, continuous ingestion, or index-to-index reindex.
Как установить скилл elasticsearch-ingest?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл elasticsearch-ingest запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic