Choosing Full-Text, Vector or Hybrid Search
This lesson explains the strengths and weaknesses of keyword, vector and hybrid search and how to choose between them.
Learning outcomes
After completing this lesson, you will be able to:
- Describe what full-text search and vector search each match well.
- Explain the benefits and costs of hybrid search.
- Choose a search approach for a scenario.
Keyword (full-text) search
Full-text search finds documents that contain the query's words, with linguistic help such as stemming (run, ran, running), prefixes and proximity, and ranks them by term statistics. It excels at exact terms: product codes, model numbers, names, error messages and domain jargon. It fails when users describe something with different words than the documents use, for example 'something to keep my feet dry' for 'waterproof boots'.
Semantic vector search
Vector search compares embeddings, so it matches meaning across different wording, synonyms and even languages with a multilingual model. It handles natural-language questions well. It can miss or misrank exact identifiers, which carry little semantic meaning, and its quality depends on the embedding model and what was embedded. It also needs a model call to embed each query.
Vector search strengths
Hybrid search and the choice
Hybrid search runs both and fuses the ranked lists, usually with reciprocal rank fusion, so documents that match exact terms and documents that match meaning both rise. It gives the most robust relevance for general search boxes, at the cost of two searches and some tuning. The following comparison summarizes the choice.
In every approach, structured constraints such as price, category, tenant or date are applied as ordinary WHERE predicates rather than left to the text search.
Which search approach?
A support search box
Customers type queries such as 'error E-4012 on startup' and 'my stove will not stay lit in the wind' into a support search over 30,000 articles. Vector search finds the second kind well but ranks the article for E-4012 low. Which approach should the developer implement?
Implement hybrid search: a full-text search that matches the exact error code, a vector search for descriptive questions, and reciprocal rank fusion to combine them. Full-text search alone would miss paraphrased problems, and tuning the embedding text cannot reliably make exact codes rank first.
Which search approach is weakest for exact product codes?
Show answer
Vector search, because codes carry little semantic meaning; full-text search matches them exactly.
Exam Tips
Remember for the exam
- Exact codes and names: full-text search.
- Paraphrased, descriptive questions: vector search.
- Both in one search box: hybrid search with RRF.
- Apply structured constraints as WHERE predicates in every approach.