[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A74HEPJKQ8DZWWG3RN4Y5F":3,"skill-same:01M7A74HEPJKQ8DZWWG3RN4Y5F":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M7A74HEPJKQ8DZWWG3RN4Y5F","elasticsearch-opensearch-expert",null,"Design and operation of Elasticsearch\u002FOpenSearch: mappings and analyzers, complex queries (bool, nested, aggregations), cluster tuning (shards, replicas, segment merging), JVM heap management, ILM for index management, and security (TLS, RBAC). Use when designing search indexes for cloud-native services, writing complex search queries, tuning cluster performance, configuring index lifecycle management, or debugging slow queries. Trigger: Elasticsearch mapping, OpenSearch query, cluster tuning, shard optimization, ILM policy, search index. Do NOT trigger for: standard SQL optimization, relational DB schema design, Redis caching.","ronsilver\u002Fagent-covenant","ronsilver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F46677526?v=4","01M7A719H1DVMZSKNAESAC82DA","Jorge Maturana","01M7A719J5GP33TM303CB8NN00",1,"MIT","https:\u002F\u002Fgithub.com\u002Fronsilver\u002Fagent-covenant\u002Fblob\u002Fmain\u002Fcontent\u002Fskills\u002Felasticsearch-opensearch-expert\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: elasticsearch-opensearch-expert\ndescription: \"Design and operation of Elasticsearch\u002FOpenSearch: mappings and analyzers, complex queries (bool, nested, aggregations), cluster tuning (shards, replicas, segment merging), JVM heap management, ILM for index management, and security (TLS, RBAC). Use when designing search indexes for cloud-native services, writing complex search queries, tuning cluster performance, configuring index lifecycle management, or debugging slow queries. Trigger: Elasticsearch mapping, OpenSearch query, cluster tuning, shard optimization, ILM policy, search index. Do NOT trigger for: standard SQL optimization, relational DB schema design, Redis caching.\"\nlicense: MIT\nmetadata:\n  author: Community\n  version: \"1.0\"\n  category: data\n  status: stable\n---\n# Elasticsearch\u002FOpenSearch Expert\n\n**Search engine: mappings, queries, aggregations and tuning.**\n\n## Core Stack\n\n- Engine: Elasticsearch \u002F AWS OpenSearch Service\n- Query DSL: bool, match, term, range, nested, aggregations\n- Mappings: field types, analyzers (standard, custom, language-specific)\n- Lifecycle: ILM policies (hot -> warm -> cold -> delete)\n- Monitoring: JVM heap, segment merging, shard distribution\n\n## Mapping Design\n\n```json\n{\n  \"mappings\": {\n    \"properties\": {\n      \"doc_id\": { \"type\": \"keyword\" },\n      \"customer\": {\n        \"type\": \"nested\",\n        \"properties\": {\n          \"id\":    { \"type\": \"keyword\" },\n          \"name\":  { \"type\": \"text\", \"analyzer\": \"standard\" }\n        }\n      },\n      \"size\":         { \"type\": \"long\" },\n      \"category\":     { \"type\": \"keyword\" },\n      \"description\":  { \"type\": \"text\", \"analyzer\": \"english\" },\n      \"created_at\":   { \"type\": \"date\" }\n    }\n  }\n}\n```\n\n- `keyword` for exact matches (IDs, statuses, enums)\n- `text` for full-text search with language analyzer\n- `nested` for arrays of objects needing independent queries\n- NEVER change mapping of existing field (reindex required)\n\n## Query DSL\n\n```json\n{\n  \"query\": {\n    \"bool\": {\n      \"must\": [\n        { \"term\": { \"category\": \"standard\" } },\n        { \"range\": { \"size\": { \"gte\": 1000 } } }\n      ],\n      \"filter\": [\n        { \"term\": { \"status\": \"active\" } }\n      ],\n      \"must_not\": [\n        { \"term\": { \"is_blocked\": true } }\n      ]\n    }\n  },\n  \"aggs\": {\n    \"by_category\": {\n      \"terms\": { \"field\": \"category\", \"size\": 10 },\n      \"aggs\": {\n        \"avg_size\": { \"avg\": { \"field\": \"size\" } }\n      }\n    }\n  }\n}\n```\n\n- `filter` over `must` when score doesn't matter (fast, cached)\n- Aggregations: terms, date_histogram, percentiles, cardinality\n\n## Cluster Tuning\n\n| Parameter | Recommendation | Reason |\n|---|---|---|\n| Shards per index | 1-5 for \u003C50GB | More shards = more overhead |\n| Replicas | 1 minimum (2 in prod) | Availability > cost |\n| JVM heap | 50% of RAM, max 32GB | GC overhead after 32GB |\n| Refresh interval | 30s (from 1s default) | Trading near-real-time for throughput |\n| Segment merge | Force merge after bulk writes | Reduce segment count for search speed |\n\n## ILM (Index Lifecycle Management)\n\n```\nHot (active writes) -> Warm (read-only, merged) -> Cold (cheap storage) -> Delete\n```\n\n```json\n{\n  \"policy\": {\n    \"phases\": {\n      \"hot\":   { \"min_age\": \"0ms\", \"actions\": { \"rollover\": { \"max_size\": \"50GB\" } } },\n      \"warm\":  { \"min_age\": \"7d\", \"actions\": { \"forcemerge\": { \"max_num_segments\": 1 } } },\n      \"cold\":  { \"min_age\": \"30d\" },\n      \"delete\": { \"min_age\": \"90d\", \"actions\": { \"delete\": {} } }\n    }\n  }\n}\n```\n\n## Constraints\n\n- NEVER change mapping on existing field (reindex required, can lose data)\n- NEVER run without replicas in production (data loss on node failure)\n- NEVER use scroll API for real-time user queries (use search_after)\n- ALWAYS set `index.refresh_interval: 30s` for bulk ingestion workloads\n- ALWAYS monitor JVM heap pressure (GC overhead >20% = scale up)\n- NEVER use `*` query prefix (performance disaster)\n\n## Overview\n\nDesign and operate Elasticsearch \u002F AWS OpenSearch Service for search indexes, complex queries, aggregations, cluster tuning, and index lifecycle management across services.\n\n## Quick Reference\n\n| Task | Tool\u002FPattern | Best Practice |\n|---|---|---|\n| Exact match | `keyword` field + `term` query | Use for IDs, statuses, enums |\n| Full-text search | `text` field + `match` query | Set language analyzer per field |\n| Nested objects | `nested` type + `nested` query | Avoid — reindex if structure changes |\n| Aggregation | `terms`, `date_histogram`, `percentiles` | Use `filter` aggs for scoped counts |\n| Bulk ingestion | `_bulk` API + refresh_interval=30s | Force merge after bulk |\n\n## Workflow\n\n1. Define search requirements and access patterns before mapping\n2. Design mappings with appropriate field types and analyzers\n3. Set ILM policy for index rotation and retention\n4. Implement queries using bool + filter for cached performance\n5. Monitor JVM heap pressure and segment counts\n6. Tune shard count, refresh interval, and replica count per workload\n\n## Anti-patterns\n\nFAIL: Wildcard prefix queries on large indexes\n```json\n\u002F\u002F BAD: unbounded prefix scan\n{ \"query\": { \"prefix\": { \"description\": \"pay\" } } }\n\n\u002F\u002F GOOD: ngram analyzer or search-as-you-type field\n{ \"query\": { \"match_phrase_prefix\": { \"description\": \"pay\" } } }\n```\n\nFAIL: Changing field mapping on existing data without reindex\n```json\n\u002F\u002F BAD: trying to change type of existing field\nPUT \u002Fdocuments\u002F_mapping { \"properties\": { \"size\": { \"type\": \"text\" } } }\n\n\u002F\u002F GOOD: create new index with correct mapping, reindex\nPOST \u002F_reindex { \"source\": { \"index\": \"documents_v1\" }, \"dest\": { \"index\": \"documents_v2\" } }\n```\n\nFAIL: Using scroll for user-facing search requests\n```python\n# BAD: scroll API for paginated search results\nclient.scroll(scroll_id=sid, scroll=\"1m\")\n\n# GOOD: search_after for real-time pagination\nresults = client.search(index=\"documents\", body={\"search_after\": last_sort, \"size\": 20})\n```\n\nFAIL: Dynamic template causing mapping explosion with user-generated data\n```json\n\u002F\u002F BAD: catch-all dynamic template creates unlimited unique fields\n{\n  \"dynamic_templates\": [{\n    \"strings\": { \"match_mapping_type\": \"string\", \"mapping\": { \"type\": \"text\" } }\n  }]\n}\n\u002F\u002F Result: 10K unique field names from user metadata → mapping limit exceeded\n```\n\n```json\n\u002F\u002F GOOD: bounded dynamic template with path_match + index:false for unknown\n{\n  \"dynamic_templates\": [{\n    \"known_metadata\": {\n      \"path_match\": \"metadata.*\",\n      \"match_mapping_type\": \"string\",\n      \"mapping\": { \"type\": \"keyword\", \"index\": false }\n    }\n  }, {\n    \"reject_unknown\": {\n      \"match_mapping_type\": \"*\",\n      \"mapping\": { \"type\": \"object\", \"enabled\": false }\n    }\n  }]\n}\n```\n\nFAIL: Deep pagination with from\u002Fsize on large indexes\n```json\n\u002F\u002F BAD: from\u002Fsize forces deep scroll — O(n) per page\nGET \u002Fdocuments\u002F_search\n{\n  \"from\": 10000,\n  \"size\": 100\n}\n```\n\n```json\n\u002F\u002F GOOD: search_after for cursor-based pagination (constant time)\nGET \u002Fdocuments\u002F_search\n{\n  \"size\": 100,\n  \"sort\": [{ \"created_at\": \"asc\" }, { \"doc_id\": \"asc\" }],\n  \"search_after\": [\"2026-05-01T00:00:00Z\", \"doc_99999\"]\n}\n```\n\n## References\n\n- OpenSearch documentation: https:\u002F\u002Fopensearch.org\u002Fdocs\u002Flatest\u002F (last_verified: 2026-05)\n- Elasticsearch guide: https:\u002F\u002Fwww.elastic.co\u002Fguide\u002Fen\u002Felasticsearch\u002Freference\u002Fcurrent\u002Findex.html (last_verified: 2026-05)\n- AWS OpenSearch Service: https:\u002F\u002Fdocs.aws.amazon.com\u002Fopensearch-service\u002Flatest\u002Fdeveloperguide\u002F (last_verified: 2026-05)\n\n- [references\u002Fcluster-tuning.md](references\u002Fcluster-tuning.md)\n- [references\u002Fquery-patterns.md](references\u002Fquery-patterns.md)\n- [references\u002Fsecurity.md](references\u002Fsecurity.md)\n\n## Verification Checklist\n- [ ] Mapping designed with correct field types (keyword for exact, text for full-text, nested for arrays)\n- [ ] ILM policy configured with hot\u002Fwarm\u002Fcold\u002Fdelete phases matching retention requirements\n- [ ] `index.refresh_interval` set to 30s (or appropriate) for bulk ingestion workloads\n- [ ] JVM heap monitored and below 75% (GC overhead \u003C 20%)\n- [ ] Shard count per index kept between 1-5 for indexes \u003C 50GB\n- [ ] No wildcard prefix queries (`*` prefix) in production query patterns\n- [ ] Replicas ≥ 1 in production (≥2 for critical indexes)\n\n## Troubleshooting\n\n| Symptom | Likely cause | Fix |\n|---|---|---|\n| Search returns no results for text field | Mapping uses `keyword` type (exact match only) instead of `text` (full-text analysis) | Reindex with `text` type and appropriate analyzer; adjust query to use `match` instead of `term` |\n| Cluster health `yellow` (unassigned shards) | Primary shard allocated but replicas cannot be placed — insufficient nodes | Add data nodes; reduce replica count temporarily if nodes are limited |\n| Query latency > 1s on small index | No filter context for cached queries; wildcard prefix query used | Replace non-scoring `must` clauses with `filter` (cached); avoid prefix queries on large fields |\n| Indexing slows down over time | Segment count growing; refresh interval too frequent (1s default) | Increase `refresh_interval` to 30s; force merge after bulk; reduce shard count |\n| Latency spikes during normal business hours (no query pattern change) | Shard rebalancing triggered by node add\u002Fremove or replica count change competes with write throughput | Schedule rebalancing during maintenance windows: `PUT _cluster\u002Fsettings {\"transient\":{\"cluster.routing.rebalance.enable\":\"none\"}}` during peak hours |\n| `Fielddata circuit breaker` exception on terms aggregation with high-cardinality field | `fielddata=true` on `text` field with millions of unique terms; aggregation loads all terms into memory | Use `keyword` type with `doc_values` enabled (not `fielddata`); limit `terms` aggregation `size`; use `composite` aggregation for high-cardinality pagination |\n| Gotcha: `match_phrase` query returns no results despite matching words | Tokenizer position gaps from stopwords or synonyms disrupt phrase matching | Use `match_phrase` with `slop` parameter; prefer `intervals` query for complex phrase matching; verify tokenization with `_analyze` API |\n| Workaround: frozen indices search fails when shards are partially allocated | Frozen index requires all shards online before search returns | Use `POST _freeze` to fully freeze before period; avoid hot data in frozen tier; convert cold indices to frozen tier when no longer written |\n","# Elasticsearch\u002FOpenSearch Expert\n\n**Search engine: mappings, queries, aggregations and tuning.**\n\n## Core Stack\n\n- Engine: Elasticsearch \u002F AWS OpenSearch Service\n- Query DSL: bool, match, term, range, nested, aggregations\n- Mappings: field types, analyzers (standard, custom, language-specific)\n- Lifecycle: ILM policies (hot -> warm -> cold -> delete)\n- Monitoring: JVM heap, segment merging, shard distribution\n\n## Mapping Design\n\n```json\n{\n  \"mappings\": {\n    \"properties\": {\n      \"doc_id\": { \"type\": \"keyword\" },\n      \"customer\": {\n        \"type\": \"nested\",\n        \"properties\": {\n          \"id\":    { \"type\": \"keyword\" },\n          \"name\":  { \"type\": \"text\", \"analyzer\": \"standard\" }\n        }\n      },\n      \"size\":         { \"type\": \"long\" },\n      \"category\":     { \"type\": \"keyword\" },\n      \"description\":  { \"type\": \"text\", \"analyzer\": \"english\" },\n      \"created_at\":   { \"type\": \"date\" }\n    }\n  }\n}\n```\n\n- `keyword` for exact matches (IDs, statuses, enums)\n- `text` for full-text search with language analyzer\n- `nested` for arrays of objects needing independent queries\n- NEVER change mapping of existing field (reindex required)\n\n## Query DSL\n\n```json\n{\n  \"query\": {\n    \"bool\": {\n      \"must\": [\n        { \"term\": { \"category\": \"standard\" } },\n        { \"range\": { \"size\": { \"gte\": 1000 } } }\n      ],\n      \"filter\": [\n        { \"term\": { \"status\": \"active\" } }\n      ],\n      \"must_not\": [\n        { \"term\": { \"is_blocked\": true } }\n      ]\n    }\n  },\n  \"aggs\": {\n    \"by_category\": {\n      \"terms\": { \"field\": \"category\", \"size\": 10 },\n      \"aggs\": {\n        \"avg_size\": { \"avg\": { \"field\": \"size\" } }\n      }\n    }\n  }\n}\n```\n\n- `filter` over `must` when score doesn't matter (fast, cached)\n- Aggregations: terms, date_histogram, percentiles, cardinality\n\n## Cluster Tuning\n\n| Parameter | Recommendation | Reason |\n|---|---|---|\n| Shards per index | 1-5 for \u003C50GB | More shards = more overhead |\n| Replicas | 1 minimum (2 in prod) | Availability > cost |\n| JVM heap | 50% of RAM, max 32GB | GC overhead after 32GB |\n| Refresh interval | 30s (from 1s default) | Trading near-real-time for throughput |\n| Segment merge | Force merge after bulk writes | Reduce segment count for search speed |\n\n## ILM (Index Lifecycle Management)\n\n```\nHot (active writes) -> Warm (read-only, merged) -> Cold (cheap storage) -> Delete\n```\n\n```json\n{\n  \"policy\": {\n    \"phases\": {\n      \"hot\":   { \"min_age\": \"0ms\", \"actions\": { \"rollover\": { \"max_size\": \"50GB\" } } },\n      \"warm\":  { \"min_age\": \"7d\", \"actions\": { \"forcemerge\": { \"max_num_segments\": 1 } } },\n      \"cold\":  { \"min_age\": \"30d\" },\n      \"delete\": { \"min_age\": \"90d\", \"actions\": { \"delete\": {} } }\n    }\n  }\n}\n```\n\n## Constraints\n\n- NEVER change mapping on existing field (reindex required, can lose data)\n- NEVER run without replicas in production (data loss on node failure)\n- NEVER use scroll API for real-time user queries (use search_after)\n- ALWAYS set `index.refresh_interval: 30s` for bulk ingestion workloads\n- ALWAYS monitor JVM heap pressure (GC overhead >20% = scale up)\n- NEVER use `*` query prefix (performance disaster)\n\n## Overview\n\nDesign and operate Elasticsearch \u002F AWS OpenSearch Service for search indexes, complex queries, aggregations, cluster tuning, and index lifecycle management across services.\n\n## Quick Reference\n\n| Task | Tool\u002FPattern | Best Practice |\n|---|---|---|\n| Exact match | `keyword` field + `term` query | Use for IDs, statuses, enums |\n| Full-text search | `text` field + `match` query | Set language analyzer per field |\n| Nested objects | `nested` type + `nested` query | Avoid — reindex if structure changes |\n| Aggregation | `terms`, `date_histogram`, `percentiles` | Use `filter` aggs for scoped counts |\n| Bulk ingestion | `_bulk` API + refresh_interval=30s | Force merge after bulk |\n\n## Workflow\n\n1. Define search requirements and access patterns before mapping\n2. Design mappings with appropriate field types and analyzers\n3. Set ILM policy for index rotation and retention\n4. Implement queries using bool + filter for cached performance\n5. Monitor JVM heap pressure and segment counts\n6. Tune shard count, refresh interval, and replica count per workload\n\n## Anti-patterns\n\nFAIL: Wildcard prefix queries on large indexes\n```json\n\u002F\u002F BAD: unbounded prefix scan\n{ \"query\": { \"prefix\": { \"description\": \"pay\" } } }\n\n\u002F\u002F GOOD: ngram analyzer or search-as-you-type field\n{ \"query\": { \"match_phrase_prefix\": { \"description\": \"pay\" } } }\n```\n\nFAIL: Changing field mapping on existing data without reindex\n```json\n\u002F\u002F BAD: trying to change type of existing field\nPUT \u002Fdocuments\u002F_mapping { \"properties\": { \"size\": { \"type\": \"text\" } } }\n\n\u002F\u002F GOOD: create new index with correct mapping, reindex\nPOST \u002F_reindex { \"source\": { \"index\": \"documents_v1\" }, \"dest\": { \"index\": \"documents_v2\" } }\n```\n\nFAIL: Using scroll for user-facing search requests\n```python\n# BAD: scroll API for paginated search results\nclient.scroll(scroll_id=sid, scroll=\"1m\")\n\n# GOOD: search_after for real-time pagination\nresults = client.search(index=\"documents\", body={\"search_after\": last_sort, \"size\": 20})\n```\n\nFAIL: Dynamic template causing mapping explosion with user-generated data\n```json\n\u002F\u002F BAD: catch-all dynamic template creates unlimited unique fields\n{\n  \"dynamic_templates\": [{\n    \"strings\": { \"match_mapping_type\": \"string\", \"mapping\": { \"type\": \"text\" } }\n  }]\n}\n\u002F\u002F Result: 10K unique field names from user metadata → mapping limit exceeded\n```\n\n```json\n\u002F\u002F GOOD: bounded dynamic template with path_match + index:false for unknown\n{\n  \"dynamic_templates\": [{\n    \"known_metadata\": {\n      \"path_match\": \"metadata.*\",\n      \"match_mapping_type\": \"string\",\n      \"mapping\": { \"type\": \"keyword\", \"index\": false }\n    }\n  }, {\n    \"reject_unknown\": {\n      \"match_mapping_type\": \"*\",\n      \"mapping\": { \"type\": \"object\", \"enabled\": false }\n    }\n  }]\n}\n```\n\nFAIL: Deep pagination with from\u002Fsize on large indexes\n```json\n\u002F\u002F BAD: from\u002Fsize forces deep scroll — O(n) per page\nGET \u002Fdocuments\u002F_search\n{\n  \"from\": 10000,\n  \"size\": 100\n}\n```\n\n```json\n\u002F\u002F GOOD: search_after for cursor-based pagination (constant time)\nGET \u002Fdocuments\u002F_search\n{\n  \"size\": 100,\n  \"sort\": [{ \"created_at\": \"asc\" }, { \"doc_id\": \"asc\" }],\n  \"search_after\": [\"2026-05-01T00:00:00Z\", \"doc_99999\"]\n}\n```\n\n## References\n\n- OpenSearch documentation: https:\u002F\u002Fopensearch.org\u002Fdocs\u002Flatest\u002F (last_verified: 2026-05)\n- Elasticsearch guide: https:\u002F\u002Fwww.elastic.co\u002Fguide\u002Fen\u002Felasticsearch\u002Freference\u002Fcurrent\u002Findex.html (last_verified: 2026-05)\n- AWS OpenSearch Service: https:\u002F\u002Fdocs.aws.amazon.com\u002Fopensearch-service\u002Flatest\u002Fdeveloperguide\u002F (last_verified: 2026-05)\n\n- [references\u002Fcluster-tuning.md](references\u002Fcluster-tuning.md)\n- [references\u002Fquery-patterns.md](references\u002Fquery-patterns.md)\n- [references\u002Fsecurity.md](references\u002Fsecurity.md)\n\n## Verification Checklist\n- [ ] Mapping designed with correct field types (keyword for exact, text for full-text, nested for arrays)\n- [ ] ILM policy configured with hot\u002Fwarm\u002Fcold\u002Fdelete phases matching retention requirements\n- [ ] `index.refresh_interval` set to 30s (or appropriate) for bulk ingestion workloads\n- [ ] JVM heap monitored and below 75% (GC overhead \u003C 20%)\n- [ ] Shard count per index kept between 1-5 for indexes \u003C 50GB\n- [ ] No wildcard prefix queries (`*` prefix) in production query patterns\n- [ ] Replicas ≥ 1 in production (≥2 for critical indexes)\n\n## Troubleshooting\n\n| Symptom | Likely cause | Fix |\n|---|---|---|\n| Search returns no results for text field | Mapping uses `keyword` type (exact match only) instead of `text` (full-text analysis) | Reindex with `text` type and appropriate analyzer; adjust query to use `match` instead of `term` |\n| Cluster health `yellow` (unassigned shards) | Primary shard allocated but replicas cannot be placed — insufficient nodes | Add data nodes; reduce replica count temporarily if nodes are limited |\n| Query latency > 1s on small index | No filter context for cached queries; wildcard prefix query used | Replace non-scoring `must` clauses with `filter` (cached); avoid prefix queries on large fields |\n| Indexing slows down over time | Segment count growing; refresh interval too frequent (1s default) | Increase `refresh_interval` to 30s; force merge after bulk; reduce shard count |\n| Latency spikes during normal business hours (no query pattern change) | Shard rebalancing triggered by node add\u002Fremove or replica count change competes with write throughput | Schedule rebalancing during maintenance windows: `PUT _cluster\u002Fsettings {\"transient\":{\"cluster.routing.rebalance.enable\":\"none\"}}` during peak hours |\n| `Fielddata circuit breaker` exception on terms aggregation with high-cardinality field | `fielddata=true` on `text` field with millions of unique terms; aggregation loads all terms into memory | Use `keyword` type with `doc_values` enabled (not `fielddata`); limit `terms` aggregation `size`; use `composite` aggregation for high-cardinality pagination |\n| Gotcha: `match_phrase` query returns no results despite matching words | Tokenizer position gaps from stopwords or synonyms disrupt phrase matching | Use `match_phrase` with `slop` parameter; prefer `intervals` query for complex phrase matching; verify tokenization with `_analyze` API |\n| Workaround: frozen indices search fails when shards are partially allocated | Frozen index requires all shards online before search returns | Use `POST _freeze` to fully freeze before period; avoid hot data in frozen tier; convert cold indices to frozen tier when no longer written |\n",{"name":5,"license":15,"metadata":24,"description":7},{"author":25,"status":26,"version":27,"category":28},"Community","stable","1.0","data","main","6692ee5cbe39d4533b824e1c55d7d4fc01c4dde7","content\u002Fskills\u002Felasticsearch-opensearch-expert",0,"https:\u002F\u002Fgithub.com\u002Fronsilver\u002Fagent-covenant","https:\u002F\u002Fgithub.com\u002Fronsilver",":v","2026-08-27 05:49:26",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add ronsilver\u002Fagent-covenant --skill elasticsearch-opensearch-expert",{"tool":43,"command":44},"bunx","bunx skills add ronsilver\u002Fagent-covenant --skill elasticsearch-opensearch-expert",{"tool":46,"command":47},"pnpm","pnpm dlx skills add ronsilver\u002Fagent-covenant --skill elasticsearch-opensearch-expert","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fronsilver\u002Fagent-covenant\u002Fblob\u002Fmain\u002Fcontent\u002Fskills\u002Felasticsearch-opensearch-expert\u002FSKILL.md",true,[51,57,61,65],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"evals\u002Fevals.json","REFERENCE","参考文档",2192,"https:\u002F\u002Fgithub.com\u002Fronsilver\u002Fagent-covenant\u002Fblob\u002Fmain\u002Fcontent\u002Fskills\u002Felasticsearch-opensearch-expert\u002Fevals\u002Fevals.json",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fcluster-tuning.md",1339,"https:\u002F\u002Fgithub.com\u002Fronsilver\u002Fagent-covenant\u002Fblob\u002Fmain\u002Fcontent\u002Fskills\u002Felasticsearch-opensearch-expert\u002Freferences\u002Fcluster-tuning.md",{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fquery-patterns.md",1659,"https:\u002F\u002Fgithub.com\u002Fronsilver\u002Fagent-covenant\u002Fblob\u002Fmain\u002Fcontent\u002Fskills\u002Felasticsearch-opensearch-expert\u002Freferences\u002Fquery-patterns.md",{"path":66,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fsecurity.md",1194,"https:\u002F\u002Fgithub.com\u002Fronsilver\u002Fagent-covenant\u002Fblob\u002Fmain\u002Fcontent\u002Fskills\u002Felasticsearch-opensearch-expert\u002Freferences\u002Fsecurity.md",[70,77,84,91,98,105],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7A7HYVYNZ60GNGWAV51ZQ52","web-browsing-agent-expert","Web browsing for AI agents: driving a headless browser (Playwright, Puppeteer) from agent tooling, navigation and page-state grounding, DOM extraction and structured data capture, form interaction, session and cookie management, anti-bot mitigation awareness, and safe browsing rules (no PII exfiltration, respect robots and terms). Use when building a browsing tool or MCP server for an agent, teaching an agent to navigate and read web pages, extracting structured content from dynamic sites, or handling login walls and pagination in agent workflows. Trigger: web browsing agent, headless browser, Playwright MCP, Puppeteer, browser automation for agents, DOM extraction, page navigation, session management. Do NOT trigger for: end-to-end UI testing of an application (use playwright-expert); writing standalone scraping scripts for data pipelines (use python-expert); fetching a single public URL (use the fetch tool).","https:\u002F\u002Fgithub.com\u002Fronsilver\u002Fagent-covenant\u002Fblob\u002Fmain\u002Fcontent\u002Fskills\u002Fweb-browsing-agent-expert\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7A7HRC6951BAJ9NHBZA2M7Y","vector-databases","Design and operate vector databases for cloud-native AI features. Use when selecting between pgvector, Pinecone, or Weaviate for AI context layer or integration-hub; designing embedding schemas and index parameters; implementing ANN search with metadata filtering; managing embedding model versions; optimizing query latency; or debugging low retrieval quality. Pairs with rag-architecture for pipeline design and postgres-database-expert for pgvector specifics. Trigger: vector database, pgvector, Pinecone, Weaviate, embedding, ANN search, HNSW, cosine similarity. Do NOT trigger for: relational SQL optimization, standard PostgreSQL schema design, Redis caching.","https:\u002F\u002Fgithub.com\u002Fronsilver\u002Fagent-covenant\u002Fblob\u002Fmain\u002Fcontent\u002Fskills\u002Fvector-databases\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7A7HGHGWE7NZ5A08HQZJXDN","typescript-expert","Full-stack TypeScript stack for modern projects: frontend SSR\u002FCSR with Next.js 14 App Router and React, backend APIs with Node.js (Express\u002FFastify), state management with Zustand\u002FRedux Toolkit, unit and integration testing with Vitest\u002FJest + React Testing Library + MSW, and static analysis with ESLint\u002FPrettier\u002Ftsc. Use when building React components or hooks, implementing Next.js App Router or Server Components, writing Node.js REST API handlers, implementing middleware (auth, rate-limit, logging), managing client state (Zustand\u002FRTK), writing frontend\u002Fbackend tests, or running TypeScript linting\u002Ftype checks. Trigger: TypeScript, Next.js, React, Zustand, Node.js, Express, Fastify, MSW, Vitest. Do NOT trigger for: Python backend development, Go microservices, iOS\u002Fmobile development.","https:\u002F\u002Fgithub.com\u002Fronsilver\u002Fagent-covenant\u002Fblob\u002Fmain\u002Fcontent\u002Fskills\u002Ftypescript-expert\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7A7H83JK9SENNYAPTTB6B4A","tool-usage","Guide correct tool selection, design, and orchestration for AI agents. Use when choosing between dedicated vs Bash tools, designing MCP tool interfaces, naming tool parameters, handling tool response limits, orchestrating parallel vs sequential calls, evaluating tool accuracy, applying ACI design principles, selecting workflow patterns, or reading\u002Ffiltering\u002Ftransforming\u002Fgenerating structured data (JSON, YAML, CSV, TOML, XML). Trigger: tool selection, MCP tool design, orchestration, ACI, parallel execution, composite tool, structured data, jq, yq, dasel, mlr, csvkit. Do NOT trigger for: writing application business logic, domain-specific development (route to domain skill), database migrations.","https:\u002F\u002Fgithub.com\u002Fronsilver\u002Fagent-covenant\u002Fblob\u002Fmain\u002Fcontent\u002Fskills\u002Ftool-usage\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7A7GZ9A2VA9T7BJ07VV3PD5","token-efficiency","Enforce token-efficient output, compression, caching, and model routing. Use when calibrating response verbosity, applying compression strategies to logs or RAG chunks, routing tasks to the right model tier, setting thinking budgets, enforcing word limits, compressing context before reinitiation, applying KV-cache ordering, masking tool output observations, or applying clarification-first protocol before irreversible actions. Trigger: token efficiency, compression, model routing, thinking budget, KV-cache, clarification protocol. Do NOT trigger for: non-agent tooling, CI\u002FCD pipeline scripting, infrastructure provisioning.","https:\u002F\u002Fgithub.com\u002Fronsilver\u002Fagent-covenant\u002Fblob\u002Fmain\u002Fcontent\u002Fskills\u002Ftoken-efficiency\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M7A7GQFTY8GWVN4Z66Q4J52V","time-series-db","Time-series database patterns for cloud-native metrics and analytics: TimescaleDB, InfluxDB, and Amazon Timestream selection; continuous aggregates, retention policies, downsampling, and integration with Prometheus\u002FGrafana. Use when storing business metrics over time, building custom business dashboards, designing high-frequency event storage, or querying time-bucketed aggregations. Trigger: time-series, TimescaleDB, InfluxDB, Prometheus, Grafana, hypertable, continuous aggregate, retention policy. Do NOT trigger for: relational PostgreSQL schema design, NoSQL document stores, Kafka event streaming.","https:\u002F\u002Fgithub.com\u002Fronsilver\u002Fagent-covenant\u002Fblob\u002Fmain\u002Fcontent\u002Fskills\u002Ftime-series-db\u002FSKILL.md",[],[]]