(
collection: &Collection,
transaction: &ImplicitTransaction,
config: &Config,
embeddings: Vec<RawVectorEmbedding>,
)
| 267 | } |
| 268 | |
| 269 | pub fn implicit_txn_upsert( |
| 270 | collection: &Collection, |
| 271 | transaction: &ImplicitTransaction, |
| 272 | config: &Config, |
| 273 | embeddings: Vec<RawVectorEmbedding>, |
| 274 | ) -> Result<(), WaCustomError> { |
| 275 | let version = transaction.version(collection)?; |
| 276 | transaction.append_to_wal(collection, VectorOp::Upsert(embeddings.clone()))?; |
| 277 | match config.indexing.mode { |
| 278 | VectorsIndexingMode::Sequential => { |
| 279 | collection.index_embeddings(embeddings, version, config)?; |
| 280 | } |
| 281 | VectorsIndexingMode::Batch { batch_size } => { |
| 282 | embeddings |
| 283 | .into_par_iter() |
| 284 | .chunks(batch_size) |
| 285 | .try_for_each(|embeddings| { |
| 286 | collection.index_embeddings(embeddings, version, config) |
| 287 | })?; |
| 288 | } |
| 289 | } |
| 290 | Ok(()) |
| 291 | } |
| 292 | |
| 293 | pub fn implicit_txn_delete( |
| 294 | collection: &Collection, |
nothing calls this directly
no test coverage detected