search

Implement Elasticsearch full-text search with facets, autocomplete, and aggregations.

53|1|Updated Dec 18, 2025
One-click install
npx skills add https://github.com/cosmix/claude-code-setup --skill search-cosmix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: search
Source: https://github.com/cosmix/claude-code-setup/tree/main/skills/search
Command: npx skills add https://github.com/cosmix/claude-code-setup --skill search-cosmix

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill covers Elasticsearch fundamentals, full-text search, indexing strategies, and faceted search patterns.

Core Features & Use Cases

  • Indexing & Queries: Basic to advanced search patterns.
  • Facets & Aggregations: Category facets and price ranges.
  • Autocomplete & Suggestions: Completion suggesters.

Quick Start

Set up a simple index with a text field and perform a multi-match query.

Frequently Asked Questions about search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement full-text search with Elasticsearch?

Full-text search with Elasticsearch indexes document content and executes multi-field queries to return ranked, relevant results. Create an index with text field mappings, configure custom analyzers for tokenization, then query using match or multi_match to retrieve documents by relevance score.

What's the best way to set up indexing and mappings in Elasticsearch?

Indexing in Elasticsearch requires defining mappings that specify field types, analyzers, and tokenization rules before ingesting documents. Design mappings to optimize query performance and relevance by choosing appropriate field types like text for full-text search or keyword for exact matching.

How do I add autocomplete and suggestions to my search?

Elasticsearch completion suggesters enable autocomplete by indexing prefix-optimized data structures. Configure a completion field type in your mapping, index documents with suggestion data, then query the suggest API to return matching prefixes as users type.

Can I use faceted navigation and aggregations with Elasticsearch search?

Faceted navigation using Elasticsearch aggregations groups search results by category, price ranges, or other dimensions without re-querying. Execute aggregation queries alongside search requests to compute counts and statistics, then display facets to users for drill-down filtering.

How do I handle reindexing without downtime in Elasticsearch?

Zero-downtime reindexing in Elasticsearch uses aliases to switch between old and new indexes without client changes. Create a new index with updated mappings, reindex data from the old index, then atomically update the alias to point to the new index.

What are the key differences between full-text search and other search approaches?

Full-text search with Elasticsearch provides relevance ranking, tokenization, and fuzzy matching across large document sets, outperforming simple substring matching or SQL LIKE queries. It's optimized for finding semantically relevant results rather than exact string matches.