Open an existing collection from disk. The collection must have been previously created with ``create_and_open``. Args: path (str): Path or name of the existing collection. option (CollectionOption): Configuration options for opening the collection. Defaults to
(path: str, option: CollectionOption = CollectionOption())
| 225 | |
| 226 | |
| 227 | def open(path: str, option: CollectionOption = CollectionOption()) -> Collection: |
| 228 | """Open an existing collection from disk. |
| 229 | |
| 230 | The collection must have been previously created with ``create_and_open``. |
| 231 | |
| 232 | Args: |
| 233 | path (str): Path or name of the existing collection. |
| 234 | option (CollectionOption): Configuration options |
| 235 | for opening the collection. Defaults to a default-constructed |
| 236 | ``CollectionOption()`` if not provided. |
| 237 | |
| 238 | Returns: |
| 239 | Collection: An opened collection instance. |
| 240 | |
| 241 | Examples: |
| 242 | >>> import zvec |
| 243 | >>> coll = zvec.open("./my_collection") |
| 244 | """ |
| 245 | _collection = _Collection.Open(path, option) |
| 246 | return Collection._from_core(_collection) |