1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! # vectX Core
//!
//! Core library for the vectX vector database.
//!
//! This crate provides the fundamental data structures and algorithms:
//!
//! - [`Vector`] - Dense vector representation with SIMD operations
//! - [`Point`] - A vector with ID and optional payload
//! - [`Collection`] - Container for points with indexing
//! - [`HnswIndex`] - HNSW approximate nearest neighbor index
//! - [`BM25Index`] - Full-text search with BM25 ranking
//!
//! ## Example
//!
//! ```rust
//! use vectx_core::{Vector, Point, PointId, Collection, CollectionConfig, Distance};
//!
//! // Create a collection
//! let config = CollectionConfig {
//! name: "test".to_string(),
//! vector_dim: 3,
//! distance: Distance::Cosine,
//! use_hnsw: true,
//! enable_bm25: false,
//! };
//! let collection = Collection::new(config);
//!
//! // Insert a point
//! let vector = Vector::new(vec![1.0, 0.0, 0.0]);
//! let point = Point::new(PointId::String("p1".to_string()), vector, None);
//! collection.upsert(point).unwrap();
//!
//! // Search
//! let query = Vector::new(vec![1.0, 0.0, 0.0]);
//! let results = collection.search(&query, 10, None);
//! ```
/// SIMD-optimized vector operations
///
/// Provides hardware-accelerated distance calculations:
/// - AVX2/FMA on x86_64
/// - SSE on x86
/// - NEON on ARM64/Apple Silicon
pub use ;
pub use Vector;
pub use ;
pub use ;
pub use HnswIndex;
pub use ;
pub use BM25Index;
pub use ;
pub use ;