Skip to content

Collection initializer base

logger = logging.getLogger(__name__) module-attribute

CollectionInitializer

Bases: ABC

Interface for initializing a collection in qdrant.

  • Create collection with vector config
  • Add payload indexes
  • etc.

collection_name abstractmethod property

Name of collection to use within qdrant.

default_indexes abstractmethod property

Default index params.

dense_vector_params property

qdrant_client = qdrant_client instance-attribute

sparse_vector_params property

__init__(qdrant_client)

check_existing_collection_config(config_override=None) async

Check if existing collection has matching vector config.

Raise error if config does not match.

collection_exists() async

Check if the collection already exists.

create_collection(config_override=None) async

Create collection (with vector config).

ensure_indexes(index_overrides=None) async

Ensure payload indexes exist or are created.

IndexUpdateStatus

Bases: TypedDict

created instance-attribute

deleted instance-attribute

updated instance-attribute