vector-search-setup

Configure Elasticsearch indices with dense_vector mappings for kNN and hybrid retrieval.

6|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/patrykkopycinski/elastic-cursor-plugin --skill vector-search-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vector-search-setup
Source: https://github.com/patrykkopycinski/elastic-cursor-plugin/tree/main/.cursor/skills/vector-search-setup
Command: npx skills add https://github.com/patrykkopycinski/elastic-cursor-plugin --skill vector-search-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a clear, end-to-end workflow to add vector and semantic search capabilities to Elasticsearch so applications can retrieve semantically relevant documents rather than relying solely on keyword matches.

Core Features & Use Cases

  • Index Provisioning: Create indices with dense_vector mappings sized for your embedding model (e.g., 384 or 768 dimensions).
  • Embedding Integration: Support for inference endpoints or ingest pipelines to generate embeddings at ingest time or from the application.
  • Search & Validation: Index documents with vectors and run kNN or hybrid keyword+vector queries, with guidance on tuning size and num_candidates.
  • Use Case: Add semantic search to a customer support knowledge base to surface relevant articles by meaning rather than exact keyword overlap.

Quick Start

Create a dense_vector-enabled index, ensure documents are indexed with embeddings, and run a sample kNN search to verify results.

Frequently Asked Questions about vector-search-setup

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

FAQPage Schema
How do I set up vector search in Elasticsearch for semantic retrieval?

To set up vector search in Elasticsearch, you create indices with dense_vector mappings sized for your embedding model, index documents with generated embeddings, and run kNN or hybrid queries to retrieve semantically relevant results.

Can I use an ingest pipeline to generate embeddings for Elasticsearch dense_vector fields?

Yes, you can use Elasticsearch ingest pipelines or inference endpoints to generate embeddings at ingest time. This automates embedding creation for dense_vector fields, ensuring documents are properly indexed for kNN search without manual application-side processing.

What is the best way to combine keyword and vector search ranking in Elasticsearch?

The best way to combine keyword and vector search in Elasticsearch is using hybrid queries. This approach merges traditional keyword matching with kNN dense_vector retrieval, allowing you to tune parameters like size and num_candidates for optimal ranking.

Does Elasticsearch kNN search require specific dense_vector dimensions for different embedding models?

Yes, Elasticsearch kNN search requires dense_vector mappings sized to match your specific embedding model's output dimensions, such as 384 or 768 dimensions. The mapping must be defined correctly during index provisioning for semantic search to function.

How do I tune kNN search parameters like size and num_candidates for Elasticsearch vector queries?

You tune Elasticsearch kNN search by adjusting the size and num_candidates query parameters. Size controls the number of returned results, while num_candidates balances search accuracy against performance by determining how many candidate vectors are evaluated per shard.

Can I use Elasticsearch vector search for RAG retrieval pipelines?

Yes, Elasticsearch vector search is designed for RAG retrieval pipelines. By indexing dense_vector embeddings and running kNN queries, you retrieve semantically relevant documents that serve as context for retrieval-augmented generation applications.