elasticsearch-search-relevance
Skill by elastic
Improves Elasticsearch search relevance for content and catalog indices. It pins or promotes results with query rules and tunes full-text ranking with multi_match and field boosts. Built for search engineers and developers working on Elasticsearch search.
Install elasticsearch-search-relevance
Built from the published package, never by AI.
git clone --depth 1 https://github.com/elastic/agent-skills /tmp/agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agent-skills/skills/elasticsearch/elasticsearch-search-relevance ~/.claude/skills/elasticsearch-search-relevanceRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install elasticsearch-search-relevance in Claude Code
git clone --depth 1 https://github.com/elastic/agent-skills /tmp/agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/agent-skills/skills/elasticsearch/elasticsearch-search-relevance ~/.gemini/antigravity-cli/skills/elasticsearch-search-relevanceAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install elasticsearch-search-relevance in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill improves full-text search relevance in Elasticsearch for content and catalog indices. It first reads the index mapping and the current query, then picks one relevance lever. Query rules pin or exclude documents for a specific query. Organic tuning uses multi_match across mapped text fields with field boosts, and can inspect analysis with the analyze API.
The skill runs its operations through the elastic CLI and does not call the HTTP API directly. After each change, it runs baseline and candidate searches and compares the top hits, scores, and source fields before reporting success. It is aimed at developers and search engineers working on product catalogs, documentation, or knowledge bases. It does not cover ES|QL analytics, index ingest, cluster health, or semantic and vector retrieval.
Written from the project's SKILL.md and checked against it.
What it can do
- Inspect mappingReads the index mapping and current query to find text and keyword fields.
- Pin or promote documentsCreates pinned query rules and wires the rule query into the search request.
- Exclude documentsUses exclude rules with a rule query to hide specific documents for a query.
- Tune organic rankingBuilds multi_match queries across text fields with field boosts from the mapping.
- Check analysisInspects tokenization of sample query text with the analyze API when misses need explaining.
- Validate query rulesTests rule criteria with the query rules test API before running the search.
- Compare top hitsRuns baseline and candidate searches and compares ids, order, scores and source fields.
What you need
- elastic CLI version 0.2 or later with stack es support
- Elasticsearch 8.10 or later
- Self-managed Elasticsearch, Elastic Cloud Hosted, or Elastic Cloud Serverless
Try asking
- Pin SKU123 as the first result for the query sale on my catalog index
- Improve ranking for running shoes searches on my product index
- Why do my documentation searches rank the wrong pages first?
Good to know
- Query rules require Elasticsearch 8.10 or later.
- ES|QL search, semantic, vector and hybrid retrieval are out of scope.
- Sorting by price or date is not used to fake text relevance.
- A ruleset alone does not pin results; the search must include the rule query.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/elasticsearch/elasticsearch-search-relevance/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md13 KB -
references/multi-match-tuning.md4 KB -
references/query-rules-reference.md4 KB
Alternatives to elasticsearch-search-relevance
All alternatives →Box lets an AI assistant search, read, upload, download, move, rename, delete, restore and share Box content. It also manages comments and metadata. It suits people who work with files stored in Box.
Guides AI assistants in using n8n-mcp MCP tools to search nodes, validate configs, browse templates and manage n8n workflows. Aimed at people building n8n workflows through MCP.
Manages citations across the research and writing process. It covers searching Google Scholar and PubMed, converting DOIs, PMIDs and arXiv IDs to BibTeX, and validating bibliographies. It is for researchers building bibliographies for manuscripts or theses.
Exa Search is a skill that guides an AI assistant to use the Exa MCP server for neural search. It covers web pages, code, companies, and people, and is for users who need current information or research during development tasks.
Runs recent community and social trend research over the last 30 days. It suits teams who need to know what people are saying now about a topic or launch.
seo-flow adds the FLOW SEO framework to Claude SEO. It surfaces stage-specific AI prompts from the FLOW knowledge base across the Find, Leverage, Optimize and Win stages. It is for SEO practitioners who want evidence-led prompts.
Compare with box, n8n-mcp-tools-expert or citation-management
elasticsearch-search-relevance: common questions
Does creating a query rule pin a result by itself?
No. The search request must include a rule query that references the ruleset and supplies match_criteria, or the pin does not apply.
When should I use query rules instead of field boosts?
Use query rules when one named document must rank first for a specific query. Use multi_match and field boosts when results are generally weak for a phrase.
Does this skill handle ES|QL queries?
No. ES|QL search is out of scope and is handled by the elasticsearch-esql skill.
How do I install elasticsearch-search-relevance?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is elasticsearch-search-relevance free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is elasticsearch-search-relevance safe to use?
It scores 84 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to elasticsearch-search-relevance?
Similar skills: box, n8n-mcp-tools-expert, citation-management, exa-search.
