A sparse vector representation stores only the meaningful, nonzero features instead of every possible dimension. In search, those features are often terms or attributes shared by a query and its candidate documents. section 3.1.3 section 7.4.3
Sparse representations make scoring efficient when a query touches only a small portion of the feature space. An inverted index stores term postings, allowing tokenized and normalized query terms to retrieve matching documents before BM25 scores and ranks them. section 3.1.3 section 13.2.1
A two-term query
For the query “apple juice,” retain only the dimensions for those two terms: query_vector = [1, 1]. If doc1_vector and doc2_vector are both [1, 1], cosine similarity gives each document a score of 1.0. The sparse calculation preserves their equal relative ranking even though its absolute score differs from a dense calculation. section 3.1.3
Sparse vectors support several search designs:
- Use lexical keyword search with an inverted index whose dimensions represent indexed terms. section 7.4.3
- Use weighted query expansion to add terms beyond the literal query, including semantic search built from sparse term vectors. section 7.4.3
- Treat scores primarily as relative rankings: term matching can be fast and explainable but does not establish that a result is an objectively good semantic match. section 13.2.1


