Vector search finds results by matching the meaning of a query against the meaning of your indexed content, not just the words. Where lexical search asks, “does this document contain these terms?” vector search asks, “does this document mean something similar to what the user is looking for?”
To do this, the you use a language model to convert text into a numerical representation called a vector (or embedding), which is essentially essentially a set of coordinates that places the content in a mathematical space where similar concepts land close together. When a user runs a search, their query gets converted into a vector too, and the engine returns results whose vectors are nearest to it. This is sometimes referred to as KNN search (k-nearest neighbor) or ANN search (approximate nearest neighbor).
The result is search that can handle natural language, loose phrasing, and conceptual queries, even when the user's exact words don't appear anywhere in your content.
When Vector Search is the Right Choice
Vector search performs best when your content is descriptive and your users are expressing intent rather than searching for a specific thing. Examples include:
- Paragraphs, Articles, Transcripts: long form text content that is rich with meaning
- Product descriptions: ****long-form copy where meaning matters more than keywords
- Knowledge bases and documentation: where users ask questions in natural language
- Job listings, real estate, and catalog items with rich descriptions: ****anything where a sentence or more describes the item
- Any search where "close enough" is the goal: surfacing relevant results even when the query doesn't precisely match the content
Where Vector Search Has Limits
Vector search excels at recall. It casts a wide net and finds conceptually relevant results. That's a strength, but it also means it's not the right tool when precision matters. Searching for a part number, a brand name, or a specific log string? Lexical search will give you cleaner, more exact results.
But if you're thinking, "my users might search for SKU-4872 just as easily as they search for 'lightweight rain jacket for hiking'," that's exactly what Hybrid Search is for.
It's also worth knowing that vector search adds operational complexity. Configuring a vector-enabled index requires more planning than a standard lexical setup. Your index mapping, field types, and query structure all need to be built with vectors in mind from the start. Bonsai handles the infrastructure side of this, but the index configuration and query design are your team's responsibility. See our vector search setup guide for recommendations.
Vector Search in OpenSearch
OpenSearch began as a lexical search engine and has since evolved to support vector search as well. Enabling it is an index-level configuration, meaning you'll define vector fields in your mappings and settings, send documents with their vector representations, and write queries that search those fields. It sounds like a lot, but you don't have to figure it out from scratch. Bonsai provides a set of recommended index configurations and query patterns to get you started on the right foot. See Enabling Vector Search on Bonsai to get started.
Bonsai clusters support vector search on all Standard, Business, and Enterprise plans. Sign up for your vector-enabled cluster here.
Ready to take a closer look at Bonsai?
Bonsai manages your search clusters and helps you achieve better search results for your users and your business. Find out if Bonsai is a good fit for you in just 15 minutes.