Collection management
In pyseekdb, a collection is a set of data, similar to a table in a database. You can create, query, fork, and delete collections.
The following APIs are available for collection operations:
| API | Description | Doc |
|---|---|---|
create_collection() | Create a collection. | Doc |
get_collection() | Get a specified collection. | Doc |
get_or_create_collection() | Create or get a collection. If it does not exist, it is created; otherwise the existing collection is returned. | Doc |
fork() | Copy a collection to a new collection with the same data. | Doc |
list_collections() | List all collections in the database. | Doc |
count_collection() | Count collections in the database. | Doc |
has_collection() | Check whether a collection exists. | Doc |
delete_collection() | Delete a specified collection. | Doc |
Methods on the Collection object
Call the following APIs on a Collection instance after you obtain it through create_collection(), get_collection(), or similar methods (for example, collection.refresh_index()).
| API | Description | Documentation |
|---|---|---|
refresh_index() | Advances asynchronous vector index visibility so writes can participate in approximate search sooner. | Doc |