6.3 Indexing and Search Types: Vector, Hybrid & Keyword
Key Takeaways
- Data 360 search indexes chunk content, create vector embeddings, and store them for search from Prompt Builder, agents, and other apps.
- Vector search finds semantically similar content, such as matching 'How can I sign on?' to 'How to log in to my account?'.
- Hybrid search queries a vector index and a keyword index, then merges and reranks results with a fusion ranking model.
- Hybrid search handles exact product codes and domain terms, such as distinguishing 'LaserPrinter TX 400' from 'TX 440', better than vector search alone.
- Hybrid search indexes can add ranking factors such as record recency and popularity to influence result order.
6.3 Indexing and Search Types: Vector, Hybrid & Keyword
Quick Answer: A search index stores chunked content and its vector embeddings so apps such as Prompt Builder, agents, and Tableau can search it. Vector search finds content with similar meaning. Keyword search finds exact lexical matches such as product codes. Hybrid search in Data 360 queries both a vector index and a keyword index, then fuses and reranks the results, optionally weighting recency and popularity. Choose vector search for natural-language, semantic questions, and hybrid search when exact terms, codes, or domain vocabulary matter.
What Indexing Does
- Ingest structured or unstructured data into DMOs or UDMOs (unstructured data model objects).
- Chunk the text fields (section 6.2) and store chunks in a chunk DMO.
- Vectorize each chunk with an embedding model, producing numeric representations that capture meaning. Embeddings are stored in an index DMO.
- For hybrid indexes, also build a keyword index.
- Query through retrievers or the Query API.
Search indexes are defined in a data space and associated with a DMO. You manage creation, rebuild, and deletion in the Data 360 Search Index tab (with process history) or through the Connect API.
Vector Search
Vectorization converts chunks into numeric embeddings, and semantic closeness between a query embedding and chunk embeddings determines relevance.
- Strength: understands meaning and paraphrase. Salesforce's example: vector search understands that "How to log in to my account?" and "How can I sign on?" are similar.
- Weakness: exact numbers and specialized terms. Vector search can fail to distinguish "LaserPrinter TX 400" from "LaserPrinter TX 440," or match a domain term such as "LaserPrinter."
- Use when: queries are natural language over a large dataset and semantic matching matters most, for example "What is Acme famous for?"
Under the hood, Data 360 vector indexes use approximate nearest-neighbor indexing. Salesforce's hybrid index configuration example shows an HNSW index with the E5 Large V2 embedding model at 1,024 dimensions. For non-English content, choose a multilingual embedding model.
Keyword Search
- Strength: lexical precision and speed. It matches exact words, SKUs, error codes, and acronyms.
- Weakness: no understanding of synonyms or paraphrase.
- In Data 360, keyword search is the lexical half of a hybrid search index, which builds a keyword index alongside the vector index.
Hybrid Search
Salesforce defines hybrid search as combining the strengths of semantically aware vector search with the precision and speed of keyword search:
- The vector index is queried for semantic similarity.
- The keyword index is queried for lexical similarity.
- Results are merged (fused) and reranked by a fusion ranking model.
- Optional ranking factors, such as recency (for example
LastModifiedDate) and popularity (for exampleKnowledgeArticleViewStat.ViewCount), influence the final order.
How hybrid scores work
| Score | Meaning |
|---|---|
vector_score__c | Similarity score from the vector index |
keyword_score__c | Similarity score from the keyword index |
hybrid_score__c | Combined score from vector and keyword scores plus ranking factors. This determines rank |
The Salesforce fusion ranker returns a hybrid score that's a linear combination of normalized keyword and vector scores plus ranking factors. A result can rank highly even when one of its scores is zero, for example a very high vector score with no keyword match. Scores are relative to one query and shouldn't be compared across queries. You can influence relevance with parameters for supported fusion rankers, such as Reciprocal Rank Fusion (RRF) and Linear Fusion Ranker (LFR).
Autodrop is a hybrid search option that removes results after a sharp drop in relevance score, so low-quality results don't mislead downstream prompts.
Hybrid search best practices
- Chunk fields that carry context and meaning (title, body, description), not small-value fields such as Open or Closed.
- Add pre-filter fields to narrow results, such as filtering case transcripts by case status.
- Add ranking factors for popularity and recency where fresher or more-viewed content is more reliable.
- Tune fusion ranking parameters (RRF or LFR) when default relevance doesn't fit your use case.
Choosing a Search Type
| Situation | Choice | Why |
|---|---|---|
| "Does Acme motor XYZ123 use hydraulic pumps?" | Hybrid | The model code needs lexical precision; the question needs semantics |
| Customers describe problems in their own words across thousands of articles | Vector (or hybrid) | Paraphrase matching |
| Error codes such as "E-4412" drive troubleshooting | Hybrid | Keyword matching on codes |
| Recent policy updates should outrank older articles | Hybrid with a recency ranking factor | Ranking factors |
| Budget-sensitive semantic FAQ with no codes | Vector | Simpler; hybrid adds keyword indexing and processing |
Search Index Types You'll See in Data 360
| Index type | Built in | Notes |
|---|---|---|
| Vector search | Data 360 Search Index tab (advanced setup) | Chunk and index DMOs; rebuild action and process history available |
| Hybrid search | Data 360 Search Index tab (advanced setup) | Vector plus keyword indexes; ranking factors; autodrop |
| Enriched (option on vector or hybrid) | Turned on when creating the index | Adds metadata and question chunks; higher cost; requires Amazon Bedrock models enabled in Einstein Setup |
| Agentforce Data Library index | Created automatically by Agentforce Data Library in Setup | Managed from the Data 360 Search Index tab |
Creating an Index with Advanced Setup (Overview)
- In the Data 360 app, open Search Indexes → New → Advanced Setup.
- Choose Vector Search or Hybrid Search, then the source DMO or UDMO (for example Knowledge Article Version).
- Select fields to chunk and choose the chunking strategy and settings.
- Optionally add prepend fields, filter fields, ranking factors (hybrid), and enriched chunks.
- Choose the embedding model, then create the index. Data 360 creates the chunk and index DMOs.
- Create a retriever in AI Models for the index (Data 360 no longer creates default retrievers automatically), then use it in Prompt Builder or agents.
You can query indexes directly with SQL table functions such as vector_search(...) and hybrid_search(...) in the Query API. Retrievers add use-case filters, output fields, and features such as citations.
Exam Traps
- Vector ≠ keyword. Vector matches meaning; keyword matches exact terms.
- Hybrid isn't "vector with a filter." It builds and queries two indexes and fuses the scores.
- Ranking factors (recency and popularity) are a hybrid search feature.
- Scores are query-relative, so don't compare hybrid scores across different queries.
Customers search for printer models such as 'LaserPrinter TX 400' and 'TX 440', and vector-only search keeps returning the wrong model's articles. Which index type best addresses this?
In Data 360 hybrid search, which score determines the final rank of a result?
A knowledge team wants recently updated and frequently viewed articles to rank higher in hybrid search results. What should they configure?
Which statement correctly describes vector search?