elasticsearch

Provide expert guidance on Elasticsearch query DSL, index mappings, and cluster operations.

1|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/0xMerl99/FangAI --skill elasticsearch-0xmerl99
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: elasticsearch
Source: https://github.com/0xMerl99/FangAI/tree/main/crates/openfang-skills/bundled/elasticsearch
Command: npx skills add https://github.com/0xMerl99/FangAI --skill elasticsearch-0xmerl99

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill includes references (resource) components.

What problem does it solve?

This Skill provides expert guidance for managing and querying Elasticsearch, enabling efficient search, log analysis, and data platform development.

Core Features & Use Cases

  • Query DSL: Craft complex search queries using bool, match, and term clauses.
  • Index Management: Design mappings, use aliases for reindexing, and manage data with ILM policies.
  • Aggregations: Build powerful data summaries with terms, date_histogram, and pipeline aggregations.
  • Use Case: Optimize a large e-commerce search index by designing explicit mappings, implementing a search-as-you-type feature, and setting up ILM policies for data retention.

Quick Start

Use the elasticsearch skill to explain why a specific shard is unassigned in the cluster.

Frequently Asked Questions about elasticsearch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why is an Elasticsearch shard unassigned in my cluster?โ–ผ

An unassigned shard in Elasticsearch is typically caused by node failures, insufficient disk space, or shard count limits. You can diagnose the exact reason using the cluster allocation explain API and resolve it via node recovery or configuration adjustments.

How do I build complex search queries using the Elasticsearch Query DSL?โ–ผ

Build complex search queries in Elasticsearch by combining `bool`, `match`, and `term` clauses within the Query DSL. This approach allows you to construct precise filtering and relevance scoring logic for your search-driven applications.

What is the best way to manage data retention in Elasticsearch?โ–ผ

Manage data retention in Elasticsearch by configuring Index Lifecycle Management (ILM) policies. ILM automates the rolling, shrinking, and deletion of indices based on age or size, ensuring efficient long-term data management for log analytics.

How do I design explicit index mappings for an e-commerce search platform?โ–ผ

Design explicit index mappings in Elasticsearch by defining field types and analyzers prior to data ingestion. This optimizes search performance and enables features like search-as-you-type by preventing dynamic mapping conflicts.

How do aggregations work in Elasticsearch for summarizing large datasets?โ–ผ

Aggregations in Elasticsearch work by grouping data into buckets and calculating metrics like counts or averages. You can use `terms`, `date_histogram`, and `pipeline` aggregations to build powerful data summaries directly within your search queries.

Can I use Elasticsearch aliases for zero-downtime reindexing?โ–ผ

Use Elasticsearch aliases for zero-downtime reindexing by pointing an alias to a new index once the reindexing process completes. This allows seamless transitions without updating application query logic or interrupting search availability.