| 121 | } |
| 122 | |
| 123 | pub 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 | |
| 149 | impl Collection { |
| 150 | #[allow(clippy::too_many_arguments)] |
nothing calls this directly
no outgoing calls
no test coverage detected