OxiRS Vec - Vector Search Engine
Status: Production Release (v0.1.0) - Released January 7, 2026
✨ Production Release: Production-ready with API stability guarantees and comprehensive testing.
High-performance vector search infrastructure for semantic similarity search in RDF knowledge graphs.
Features
Vector Indexing
- HNSW Index - Hierarchical Navigable Small World graphs for fast approximate nearest neighbor search
- Flat Index - Exact search for smaller datasets
- IVF Index - Inverted file index for large-scale datasets
- Dynamic Updates - Real-time index updates without full rebuilds
Search Capabilities
- Similarity Search - Find semantically similar entities
- Filtered Search - Combine vector similarity with RDF constraints
- Batch Operations - Efficient bulk indexing and search
- Multiple Distance Metrics - Cosine, Euclidean, Manhattan, Dot product
Integration
- SPARQL Extension - Vector search functions in SPARQL queries
- GraphQL Support - Vector similarity in GraphQL queries
- Embedding Models - Integration with various embedding providers
- Storage Backends - Persistent vector indices
Installation
Add to your Cargo.toml:
# Experimental feature
[]
= "0.1.0"
Quick Start
Basic Vector Search
use ;
async
SPARQL Integration
use VectorFunctions;
let sparql = r#"
PREFIX vec: <http://oxirs.org/vec/>
SELECT ?entity ?score WHERE {
?entity a foaf:Person .
# Vector similarity search
?entity vec:similarTo "machine learning researcher" .
?entity vec:similarity ?score .
FILTER (?score > 0.8)
}
ORDER BY DESC(?score)
LIMIT 10
"#;
Architecture
Index Types
HNSW (Hierarchical Navigable Small World)
- Use Case: General purpose, balanced performance
- Search Time: O(log N)
- Build Time: O(N log N)
- Memory: Moderate
Flat Index
- Use Case: Small datasets, exact search required
- Search Time: O(N)
- Build Time: O(N)
- Memory: Low
IVF (Inverted File)
- Use Case: Large datasets, acceptable approximate results
- Search Time: O(√N)
- Build Time: O(N)
- Memory: Moderate
Distance Metrics
Advanced Features
Filtered Search
Combine vector similarity with RDF constraints:
use FilteredSearch;
let filters = builder
.add_constraint
.add_constraint
.build;
let results = store.filtered_search?;
Batch Operations
Efficient bulk indexing:
let batch = vec!;
store.add_batch?;
store.build_index?;
Incremental Updates
// Add without full rebuild
store.add_incremental?;
// Periodic optimization
store.optimize_index?;
Performance
Benchmarks (on sample datasets)
| Dataset Size | Index Type | Build Time | Query Time (10-NN) |
|---|---|---|---|
| 10K vectors | HNSW | 2.5s | 0.5ms |
| 100K vectors | HNSW | 28s | 1.2ms |
| 1M vectors | HNSW | 320s | 2.8ms |
| 10K vectors | Flat | 0.1s | 12ms |
| 100K vectors | IVF | 15s | 3.5ms |
Benchmarked on M1 Mac with 768-dimensional vectors
Configuration
let config = VectorStoreConfig ;
Integration Examples
With oxirs-embed
use EmbeddingModel;
use VectorStore;
// Generate embeddings
let model = load?;
let embedding = model.encode?;
// Index and search
let mut store = new?;
store.add_vector?;
With oxirs-core (RDF)
use Dataset;
use RdfVectorIndex;
let dataset = from_file?;
let mut index = new?;
// Index entities by their descriptions
for entity in dataset.subjects
Status
Production Release (v0.1.0)
- ✅ HNSW/IVF/Flat indices with persisted dataset support
- ✅ SPARQL/GraphQL integration enhanced with federation-aware vector filters
- ✅ CLI pipelines for batch embedding import/export and monitoring
- ✅ SciRS2 metrics for query latency, recall, and index health
- 🚧 GPU acceleration (targeted for future release)
- 🚧 Distributed indexing (planned for v0.2.0)
Contributing
This is an experimental module. Feedback and contributions are welcome!
License
MIT OR Apache-2.0
See Also
- oxirs-embed - Embedding generation
- oxirs-arq - SPARQL query engine
- oxirs-core - RDF data model