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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//! # Lumos Vector PostgreSQL
//!
//! PostgreSQL with pgvector implementation for the lumos-vector-core architecture.
//!
//! This crate provides a PostgreSQL backend with pgvector extension for vector storage,
//! implementing the unified VectorStorage trait from lumos-vector-core.
//!
//! ## Features
//!
//! - **SQL Integration**: Leverages PostgreSQL's ACID properties
//! - **pgvector Extension**: High-performance vector operations
//! - **Rich Queries**: Complex SQL queries with vector similarity
//! - **Transactions**: Full transaction support
//! - **Indexing**: Multiple vector index types (IVFFlat, HNSW)
//!
//! ## Example
//!
//! ```rust
//! use lumos_vector_postgres::PostgresVectorStorage;
//! use lumos_vector_core::prelude::*;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Create PostgreSQL storage
//! let storage = PostgresVectorStorage::new("postgresql://user:pass@localhost/db").await?;
//!
//! // Create an index
//! let config = IndexConfig::new("documents", 384)
//! .with_metric(SimilarityMetric::Cosine);
//! storage.create_index(config).await?;
//!
//! // Insert documents
//! let docs = vec![
//! Document::new("doc1", "Hello world")
//! .with_embedding(vec![0.1; 384])
//! .with_metadata("type", "greeting"),
//! ];
//! storage.upsert_documents("documents", docs).await?;
//!
//! Ok(())
//! }
//! ```
pub use PostgresVectorStorage;
pub use PostgresConfig;
pub use ;
// Re-export core types for convenience
pub use *;
/// Create a new PostgreSQL vector storage instance
pub async
/// Create a new PostgreSQL vector storage instance with configuration
pub async