본문으로 건너뛰기
Skillpedia
데이터베이스18k · #10675

elasticsearch

하는 일

이 스킬은 쿼리 문법, 필드 매핑, 집계, 클러스터 상태를 포함해 Elasticsearch 작업을 안내합니다. 검색 기능을 만들거나 로그와 시계열 데이터를 분석하는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓Elasticsearch에서 검색 쿼리를 쓰거나 결과를 걸러내야 할 때.
  • ✓데이터를 적재하기 전에 인덱스 매핑을 설계해야 할 때.
  • ✓클러스터 상태가 yellow나 red로 나와서 조사해야 할 때.

스킬 링크

https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/elasticsearch/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/elasticsearch/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“지난 24시간 동안의 오류 로그를 찾아서 서비스 이름별로 개수를 세는 Elasticsearch 쿼리를 작성해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 명시적 매핑, 명확한 쿼리 구조, 집계를 권장하며, 클러스터 상태와 샤드 크기를 점검하는 단계도 제시합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Elasticsearch Expert

A search and analytics specialist with deep expertise in Elasticsearch cluster architecture, query DSL, mapping design, and performance optimization. This skill provides production-grade guidance for building search experiences, log analytics pipelines, and time-series data platforms using the Elastic stack.

Key Principles

  • Design mappings explicitly before indexing data; relying on dynamic mapping leads to field type conflicts and bloated indices
  • Understand the difference between keyword fields (exact match, aggregations, sorting) and text fields (full-text search with analyzers)
  • Use index aliases for zero-downtime reindexing, canary deployments, and time-based index rotation
  • Size shards between 10-50 GB for optimal performance; too many small shards waste overhead, too few large shards limit parallelism
  • Monitor cluster health (green/yellow/red) continuously and investigate yellow status immediately, as it indicates unassigned replica shards

Techniques

  • Construct bool queries with must (scored AND), filter (unscored AND), should (OR with minimum_should_match), and must_not (exclusion) clauses
  • Use match queries for full-text search with analyzer-aware tokenization, and term queries for exact keyword lookups without analysis
  • Build aggregations: terms for top-N cardinality, date_histogram for time bucketing, nested for sub-document analysis, and pipeline aggs like cumulative_sum
  • Apply Index Lifecycle Management (ILM) policies with hot/warm/cold/delete phases to automate rollover and data retention
  • Reindex with POST _reindex using source/dest, applying scripts for field transformations during migration
  • Check cluster allocation with GET _cluster/allocation/explain to diagnose why shards remain unassigned
  • Tune search performance with the search profiler API, request caching, and pre-warming for frequently used queries

Common Patterns

  • Search-as-you-type: Use the search_as_you_type field type or edge_ngram tokenizer with a match_phrase_prefix query for autocomplete experiences
  • Parent-Child Relationships: Use join field types for one-to-many relationships where child documents update independently, avoiding costly nested reindexing
  • Cross-cluster Search: Configure remote clusters and use cluster:index syntax to query across multiple Elasticsearch deployments transparently
  • Snapshot and Restore: Register a snapshot repository (S3, GCS, or filesystem) and schedule regular snapshots for disaster recovery with SLM policies

Pitfalls to Avoid

  • Do not use wildcard queries on text fields with leading wildcards, as they bypass the inverted index and cause full field scans
  • Do not index large documents (over 100 MB) without splitting them; they cause memory pressure during indexing and merging
  • Do not set number_of_replicas to 0 in production; replicas provide both search throughput and data redundancy
  • Do not update mappings on existing indices for incompatible type changes; create a new index with the correct mapping and reindex the data
자주 묻는 질문

매핑을 직접 정의하는 이유는 무엇인가요?

자동 매핑에 의존하면 필드 타입 충돌과 부풀어 오른 인덱스가 생길 수 있어서, 스킬은 명시적 매핑을 권장합니다.

yellow 상태는 무엇을 뜻하나요?

보통 복제 샤드가 할당되지 않았다는 뜻이므로 즉시 조사해야 한다고 스킬은 말합니다.

keyword와 text 필드의 차이는 무엇인가요?

keyword 필드는 정확한 값을 찾고 정렬을 지원하며, text 필드는 전문 검색을 위해 분석됩니다.

상세 정보

작성자의 원본 설명

Elasticsearch expert for queries, mappings, aggregations, index management, and cluster operations

repo: RightNow-AI/openfang

인기도

GitHub 스타
18k
순위
#10675
라이선스
Apache-2.0
업데이트
2026. 7. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬