Skip to content

Commit e2d98a2

Browse files
committed
docs: enhance README with detailed vector search mechanics and add documentation section
1 parent a6bc8cc commit e2d98a2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ limit 3;
167167

168168
**How vector search works:** The `MATCH` operator finds vectors similar to your query vector. In the example above, `sample_embedding MATCH '[0.5, ...]'` searches for vectors closest to `[0.5, ...]` and returns them ordered by distance (smallest = most similar).
169169

170+
Under the hood, sqlite-vec stores vectors in fixed-size chunks and scans each chunk to find the top-K nearest results, using SIMD instructions (AVX on x86_64, NEON on ARM) to accelerate distance calculations. Results from each chunk are merged using a two-pointer technique to produce the final sorted output. This brute-force approach trades theoretical optimality for simplicity and reliability — no complex index structures to maintain or tune.
171+
170172
**Note:** All vector similarity queries require `LIMIT` or `k = ?` (where k is the number of nearest neighbors to return). This prevents accidentally returning too many results on large datasets, since finding all vectors within a distance threshold requires calculating distance to every vector in the table.
171173

172174
## Advanced Usage
@@ -344,6 +346,10 @@ As well as multiple individual supporters on
344346
If your company interested in sponsoring `sqlite-vec` development, send me an
345347
email to get more info: https://alexgarcia.xyz
346348

349+
## Documentation
350+
351+
For full API reference and guides, see the [upstream sqlite-vec documentation](https://alexgarcia.xyz/sqlite-vec/).
352+
347353
## See Also
348354

349355
- [**`sqlite-ecosystem`**](https://github.com/asg017/sqlite-ecosystem), Maybe

0 commit comments

Comments
 (0)