Elasticsearch
Designs, queries, and operates Elasticsearch: mappings, analyzers, query DSL, aggregations, bulk indexing, shard sizing, and cluster health. Use when writing…
от clawic★ 23 звезды на GitHub
Установить Elasticsearch в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
User preferences and memory live in ~/Clawic/data/elasticsearch/ (see setup.md on first use, memory-template.md for the file format). If you have data at an old location (~/elasticsearch/ or ~/clawic/elasticsearch/), move it to ~/Clawic/data/elasticsearch/, and say in one line that you moved it and from where.
When To Use
- Writing or reviewing a query DSL body, an index mapping, an analyzer, or an aggregation
- Search is wrong: no hits, wrong documents, wrong order, wrong buckets, or duplicates
- The cluster is unhealthy: yellow or red, unassigned shards, read-only indices, breakers tripping, heap pressure
- Indexing or search is slow, or bulk requests fail, stall, or get rejected
- Designing the index layout: shard counts, aliases, templates, data streams, ILM, multi-tenancy, reindex plans
- Operating it: snapshots and restores, security and API keys, monitoring, rolling upgrades, migration to or from OpenSearch
- Not for choosing a standalone vector database, or for lightweight site search where a cluster is more than the job needs (see Related Skills)
Quick Reference
| Situation | Play |
|---|---|
Zero hits, no error, and you can see the value in _source |
A term query against a text field, or case mismatch on a keyword — run _analyze and compare tokens (→ debugging.md) |
| Right documents, wrong order | Get "explain": true on one bad document before touching a single boost (→ relevance.md) |
| "Fielddata is disabled on text fields by default" | Aggregate and sort on the .keyword sub-field, never enable fielddata (Core Rules 9) |
| Need full-text search AND exact match on one field | Multi-field: text with a fields.keyword sub-field (→ mapping.md) |
Need to change a field's type, analyzer, or index setting |
Impossible in place: new index → _reindex → alias swap (Core Rules 3 → index-lifecycle.md) |
| Array of objects matches on the wrong combination | Objects flatten and lose per-item association; nested restores it (→ data-modeling.md) |
| Cluster yellow | Unassigned replicas; expected on a single node (set number_of_replicas: 0), otherwise _cluster/allocation/explain (→ incidents.md) |
| Cluster red | A primary is unassigned — some data is unreadable right now, stop writes and diagnose (→ incidents.md) |
| Every index suddenly rejects writes as read-only | Flood-stage disk watermark (→ incidents.md) |
circuit_breaking_exception |
A request asked for more heap than it may have — narrow the aggregation, do not raise the breaker (→ incidents.md) |
version_conflict_engine_exception |
Concurrent write: retry_on_conflict for updates, if_seq_no+if_primary_term for read-modify-write (→ bulk-indexing.md) |
| Paging past 10,000 hits fails | search_after with a point-in-time (Core Rules 8 → search-performance.md) |
| Search latency regressed | "profile": true on the slow query, then the search slow log for the pattern (→ search-performance.md) |
| Indexing throughput regressed | Refresh interval, merge pressure, and write thread-pool rejections, in that order (→ bulk-indexing.md) |
| Autocomplete / search-as-you-type | edge_ngram in the index analyzer only, never in the search analyzer (→ autocomplete.md) |
| Semantic search, embeddings, "find similar" | dense_vector + knn, blended with BM25 through RRF (→ vector-search.md) |
| Search by distance, radius, or bounding box | geo_point vs geo_shape, and the lat/lon ordering trap (→ geo-search.md) |
Logs, metrics, traces, anything with a @timestamp |
Data stream + ILM rollover, never hand-rolled daily indices (→ logs-and-timeseries.md) |
| Computed or derived value needed at query time | Runtime field first (no reindex), Painless script_score only if scoring depends on it (→ scripting.md) |
| "How do I write this in ES|QL", or an ad-hoc slice-and-group investigation | POST /_query with a pipe: FROM … | WHERE … | STATS … BY …; no scoring, implicit LIMIT 1000 (→ esql.md) |
| Alert when a NEW document matches a saved search | Reverse search: store the query in a percolator field and run percolate (→ queries.md) |
| Anything else | Shrink the query to the smallest failing form on one index, then in order: _validate/query?explain for syntax, _analyze for tokens, _explain for scoring, _profile for time |
Depth on demand, by phase:
- Diagnose —
debugging.mdwhy a document does not match or does not rank ·errors.mderror string to cause ·incidents.mdred cluster, read-only indices, breakers, heap ·monitoring.mdwhat to watch and alert on - Design —
mapping.mdfield types and mapping mechanics ·analyzers.mdthe analysis chain, synonyms, language handling ·data-modeling.mdnested, parent-child, multi-tenancy, index granularity ·queries.mdthe query DSL that matters, plus percolator reverse search ·esql.mdthe piped query language, when to prefer it, and its row cap ·relevance.mdBM25, boos
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- _meta.json
- aggregations.md
- analyzers.md
- autocomplete.md
- bulk-indexing.md
- clients.md
- cluster.md
- data-modeling.md
- debugging.md
- errors.md
- esql.md
- geo-search.md
- incidents.md
- index-lifecycle.md
- logs-and-timeseries.md
- mapping.md
- memory-template.md
- monitoring.md
- queries.md
- relevance.md
- scripting.md
- search-performance.md
- security.md
- setup.md
- snapshots.md
- upgrades.md
- vector-search.md
FAQ
Что делает скилл Elasticsearch?
Designs, queries, and operates Elasticsearch: mappings, analyzers, query DSL, aggregations, bulk indexing, shard sizing, and cluster health. Use when writing a search query or an index mapping, when a search returns nothing or the wrong documents, when a term query on a text field returns zero hits without an error, when results rank badly, when aggregations fail with "fielddata is disabled", when the cluster turns yellow or red, when shards stay unassigned, when indexing is slow or a bulk request returns per-item errors, when disk hits the flood-stage watermark and indices go read-only, when circuit breakers trip, or when paging past 10,000 hits breaks. Covers ILM rollover, reindexing, snapshots, upgrades, kNN and hybrid vector search, autocomplete, synonyms and analyzers, nested modeling, geo queries, ES|QL, Painless, ingest pipelines, data streams, security, language clients, and OpenSearch compatibility. Not for standalone vector stores (vector-databases) or lightweight site search (meilisearch).
Как установить скилл Elasticsearch?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Elasticsearch запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…