Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 84
  • 613 stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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-relevance

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install elasticsearch-search-relevance in Claude Code

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

A

No 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 →

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.

elasticsearch-search-relevance Install

Add to stack

Loading.