Nearest-neighbor search fundamentals
These are the topics in this section, each on its own page with a stable path you can bookmark or share.
What topics are covered in this section?
- What is vector search?
- What is nearest-neighbor search?
- What is k-nearest neighbors (k-NN)?
- What is top-k search?
- What is range search?
- What is ground truth in a search benchmark?
- What is exact nearest-neighbor search?
- What is approximate nearest-neighbor search (ANN)?
- What is a c-approximate nearest neighbor?
- What is recall-based approximation?
- What is candidate generation?
- What is reranking?
- What is filtered nearest-neighbor search?
- What is a predicate in search filtering?
- What is pre-filtering?
- What is post-filtering?
- What is integrated filtering?
- What are ties in nearest-neighbor results?
- What are the workload dimensions of an ANN system (N, d, k, QPS)?
Nearest-neighbor search fundamentals define the problem HNSW approximates: exact versus approximate neighbors, top-k and range search, candidates and reranking, filters, and the workload knobs N, d, k, and QPS.
What problem is HNSW solving?
Vector search and nearest-neighbor search ask for the closest points under a chosen measure. Exact search and ground truth set the quality bar; approximate nearest neighbor (ANN) and c-approximate or recall-based approximation trade a controlled miss rate for speed. Top-k, k-NN, and range search are different result shapes. Candidate generation plus reranking is the two-stage pattern many production stacks use – HNSW often plays the candidate role before a cross-encoder or exact rescore.
Filtered nearest-neighbor search, predicates, and pre-, post-, and integrated filtering explain how metadata constraints change the walk.
Which workload dimensions should you name explicitly?
Corpus size N, dimensionality d, result count k, and queries per second QPS are the axes of capacity planning. Ties in results and evaluation against ground truth keep benchmarks honest. Weaviate exposes vector, hybrid, and filtered query APIs on top of these fundamentals; choosing flat versus HNSW versus other index types is choosing how aggressively to approximate for your N and QPS.
Without this problem statement, parameter tuning has no north star.
What is a good next step?
Read vector search, ANN, recall-based approximation, and filtered search pages, then Part I’s opening chapter on why brute force fails. For database packaging of the same ideas, continue into persistence and applications hubs.
This section states the retrieval problem HNSW exists to solve. Next, read “What is approximate nearest-neighbor search (ANN)?” or Part I’s first chapter, then explore filtering terms when predicates enter the picture.