home / skills / partme-ai / full-stack-skills / elasticsearch
This skill guides Elasticsearch indexing, searching, mappings, and clustering to help you implement, optimize, and manage powerful search functionality.
npx playbooks add skill partme-ai/full-stack-skills --skill elasticsearchReview the files below or copy the command above to add this skill to your agents.
---
name: elasticsearch
description: Provides comprehensive guidance for Elasticsearch including indexing, searching, aggregations, mappings, and cluster management. Use when the user asks about Elasticsearch, needs to implement search functionality, work with Elasticsearch queries, or manage Elasticsearch clusters.
license: Complete terms in LICENSE.txt
---
## When to use this skill
Use this skill whenever the user wants to:
- [待完善:根据具体工具添加使用场景]
## How to use this skill
[待完善:根据具体工具添加使用指南]
## Best Practices
[待完善:根据具体工具添加最佳实践]
## Keywords
[待完善:根据具体工具添加关键词]
This skill provides comprehensive, practical guidance for working with Elasticsearch across indexing, searching, aggregations, mappings, and cluster management. It targets developers and operators who need to implement search features, optimize queries, or maintain healthy Elasticsearch clusters. Content focuses on actionable patterns, examples in Python, and operational best practices.
The skill inspects user intent to determine whether they need help designing mappings, writing queries, tuning performance, or managing cluster health. It explains core concepts (indices, shards, replicas, analyzers), shows query DSL and aggregation examples, and offers Python code snippets for indexing and searching. It also guides on monitoring, scaling, and recovery procedures for production clusters.
Should I use dynamic mapping or explicit mapping?
Prefer explicit mappings for production data to avoid unexpected field types and index mapping explosion. Use dynamic mapping selectively for exploratory or ingest scenarios.
How do I choose shard count and size?
Aim for shard sizes between 20GB and 50GB for typical workloads, keep shard counts modest per node, and plan for growth. Reindex if you need to change shard count.