Agent skill · elastic

elasticsearch-search-relevance

Improve Elasticsearch search relevance for content and catalog indices: pin or promote results with query rules (correct rule type, criteria, and rule-query wiring) and tune organic ranking with multi_match, field boosts, and analysis grounded in the index mapping. Use when search results rank poorly, a specific document must appear first for a query, or the user asks to tune full-text matching — not for ES|QL analytics, index ingest, or cluster health.

What it needs

About 6k tokens when loaded.

What this skill does

Elasticsearch Search Relevance Improve full-text search results on content and catalog indices. Diagnose the mapping and current query, choose the right relevance lever (query rules for deterministic pinning vs multimatch and field boosts for organic ranking), apply the change, and verify top hits before reporting success. <!-- begin-partial: preamble --> Environment Configuration This skill executes Elasticsearch operations through the elastic CLI. If the elastic CLI is not installed, tell the user what it is needed for. Do not guess credentials, call the HTTP API directly, or attempt other workarounds. This skill references operations in HTTP-shorthand form (e.g., GET /, GET /cat/indices, GET /{index}/mapping, GET /{index}/settings/index.mode, POST /query). The Operations table at the end of this document maps each shorthand to the equivalent elastic CLI command — always use the CLI rather than calling the HTTP API directly. <!-- end-partial: preamble --> Scope This skill covers Query DSL relevance on indices with text (and optional keyword) fields — product catalogs, documentation, knowledge bases. It uses POST /{index}/search for evaluation and query-rules APIs for pinned or excluded documents. Out of scope: ES QL search (POST /query) — use the elasticsearch-esql skill. Semantic / vector / hybrid retrieval — different field types and retrievers. Sorting by price, date, or popularity instead of fixing text relevance unless the user explicitly wants non-relevance ordering. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills elastic/elasticsearch-search-relevance

View the source on GitHub

Browse the @skills marketplace