MCPcopy Create free account
hub / github.com/cosdata/cosdata / Collection

Class Collection

src/models/collection.rs:123–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123pub struct Collection {
124 pub meta: CollectionMetadata,
125 pub lmdb: MetaDb,
126 pub current_version: RwLock<VersionNumber>,
127 pub last_allotted_version: RwLock<VersionNumber>,
128 pub current_explicit_transaction: RwLock<Option<ExplicitTransaction>>,
129 pub current_implicit_transaction: RwLock<ImplicitTransaction>,
130 pub vcs: VersionControl,
131 pub internal_to_external_map: TreeMap<InternalId, RawVectorEmbedding>,
132 pub external_to_internal_map: TreeMap<VectorId, InternalId>,
133 pub document_to_internals_map: TreeMapVec<DocumentId, InternalId>,
134 pub transaction_status_map: TreeMap<ExplicitTransactionID, RwLock<TransactionStatus>>,
135 pub internal_id_counter: AtomicU32,
136 pub hnsw_index: RwLock<Option<Arc<HNSWIndex>>>,
137 pub inverted_index: RwLock<Option<Arc<InvertedIndex>>>,
138 pub tf_idf_index: RwLock<Option<Arc<TFIDFIndex>>>,
139 pub key_value_index: RwLock<Option<Arc<KeyValueIndex>>>,
140 pub usv_index: RwLock<Option<Arc<USVIndex>>>,
141 // this field is actually NOT optional, the only reason it is wrapped in
142 // `Option` is to allow us to create `Collection` first without the
143 // indexing manager, because `IndexingManager`'s constructor also requires
144 // a reference to the collection
145 pub indexing_manager: RwLock<Option<IndexingManager>>,
146 pub is_indexing: AtomicBool,
147}
148
149impl Collection {
150 #[allow(clippy::too_many_arguments)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected