Quick Start
Get up and running with brinicle in minutes. This guide walks you through the basic workflow using all three engines.Shared Lifecycle
All brinicle engines follow the same lifecycle:| Mode | Meaning |
|---|---|
build | Build a new index |
insert | Add new records to an existing index |
upsert | Replace records with the same external IDs, or insert them if they do not exist |
Main Index and Delta Index
brinicle stores updates using a main index and a delta index. The main index stores the primary HNSW graph. The delta index stores later inserts and upserts. During search, brinicle searches both indexes, merges the results, filters deleted records, and returns the top matches. This allows brinicle to support updates without rebuilding the full index after every insert.Vector Search
UseVectorEngine when you already have embeddings or numeric vectors and need fast approximate nearest neighbor search:
Search Results and Distances
Usesearch(...) to return external IDs only:
search_with_distance(...) to return external IDs with distances:
VectorEngine supports these distance functions:
| Distance function | Meaning |
|---|---|
l2 | Squared Euclidean distance |
cosine_distance | 1 - cosine_similarity(a, b) |
dot_product_distance | -dot_product(a, b) |
Batch Search
Batch search runs multiple queries and returns one result list per query:n_jobs controls parallel query execution when parallel execution is available.
Item Search
UseItemSearchEngine for structured catalog-like data such as products, movies, books, or any records with titles and attributes:
alpha=0.0.
For semantic or hybrid search, provide vector_dim and pass vectors during ingest and search.
Autocomplete
UseAutocompleteEngine for query suggestions and title autocomplete:
Updates: Insert, Upsert, and Delete
Insert new records:Rebuild, Compact, and Optimize
brinicle provides maintenance methods for updated indexes.| Method | Meaning |
|---|---|
needs_rebuild() | Returns whether the index has enough update or delete drift to justify rebuilding |
rebuild_compact() | Rebuilds the index from alive records and removes deleted records physically |
optimize_graph() | Rebuilds only when the index crosses the configured maintenance threshold |
delta_ratio controls when brinicle considers an index ready for maintenance.
Common Configuration Parameters
| Parameter | Meaning |
|---|---|
dim | Vector or encoded representation dimension |
M | HNSW graph connectivity |
ef_construction | Build-time search width |
ef_search | Query-time search width |
delta_ratio | Maintenance threshold for delta and deleted records |
build_n_threads | Number of build threads |
seed | Random seed for graph construction |
Using the HTTP Server
If you prefer to deploy brinicle as a standalone service, start the HTTP server and use one of the SDK clients:Closing and Destroying an Index
Close loaded index resources:destroy() removes the index from disk.
Next Steps
- Learn about the three engines in detail
- Explore the API reference
- Install an SDK for your language
- Read about configuration options
- Check out benchmarks for performance details