Guides Elasticsearch usage including index mapping design, query DSL (match, term, bool, aggregations), bulk indexing, cluster management, and performance tuning. Use when the user needs to implement full-text search, design index mappings, write complex search queries, or manage Elasticsearch clusters.
Use this skill whenever the user wants to:
// Create index with mapping
PUT /products
{
"mappings": {
"properties": {
"name": { "type": "text", "analyzer": "standard" },
"description": { "type": "text" },
"price": { "type": "float" },
"category": { "type": "keyword" },
"created_at": { "type": "date" }
}
}
}
// Index a document
POST /products/_doc
{
"name": "Wireless Mouse",
"description": "Ergonomic wireless mouse with USB-C receiver",
"price": 29.99,
"category": "electronics",
"created_at": "2025-01-15"
}
// Search with bool query and aggregation
GET /products/_search
{
"query": {
"bool": {
"must": [{ "match": { "description": "wireless" } }],
"filter": [{ "range": { "price": { "lte": 50 } } }]
}
},
"aggs": {
"by_category": { "terms": { "field": "category" } }
}
}
dynamic: strict to catch errorsfrom/size pagination; use search_after for large result setselasticsearch, search, index, mapping, query DSL, aggregation, 搜索引擎, 全文检索, 聚合, ELK, Kibana, bulk API, cluster