---
title: qdrant_base | CodeWeaver Docs
description: API reference for codeweaver.providers.vector_stores.qdrant_base
url: "https://docs.knitli.com/api/providers/vector_stores/qdrant_base"
type: static
generatedAt: "2026-04-17T17:21:09.448Z"
---

# qdrant_base
       [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fvector_stores%2Fqdrant_base%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fvector_stores%2Fqdrant_base%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[View in Markdown](/codeweaver/api/providers/vector_stores/qdrant_base.md)       [Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fvector_stores%2Fqdrant_base%2F)[Share on X](https://x.com/intent/tweet?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fvector_stores%2Fqdrant_base%2F&text=qdrant_base)[Share on Threads](https://threads.net/intent/post?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fvector_stores%2Fqdrant_base%2F&text=qdrant_base)[Share on Bluesky](https://bsky.app/intent/compose?text=qdrant_base%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fvector_stores%2Fqdrant_base%2F)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fvector_stores%2Fqdrant_base%2F)[Share on Reddit](https://reddit.com/submit?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fvector_stores%2Fqdrant_base%2F&title=qdrant_base)[Share on Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fvector_stores%2Fqdrant_base%2F&t=qdrant_base)[Share on Email](mailto:?subject=qdrant_base&body=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fvector_stores%2Fqdrant_base%2F)[Share on WhatsApp](https://wa.me/?text=qdrant_base%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fvector_stores%2Fqdrant_base%2F)[Share on Telegram](https://t.me/share/url?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fproviders%2Fvector_stores%2Fqdrant_base%2F&text=qdrant_base)
# `codeweaver.providers.vector_stores.qdrant_base`
[Section titled “codeweaver.providers.vector_stores.qdrant_base”](#codeweaverprovidersvector_storesqdrant_base)
Defines a base class for the Qdrant and In Memory Qdrant vector stores to reduce code duplication.

## Class: `QdrantBaseProvider`
[Section titled “Class: QdrantBaseProvider”](#class-qdrantbaseprovider)
Base class for Qdrant and In Memory Qdrant vector stores with shared functionality.

### Method: `apply_quantization`
[Section titled “Method: apply_quantization”](#method-apply_quantization)

**

```
apply_quantization()
```

Apply quantization to existing collection.

This is a pure Qdrant config change - no vector updates needed. Qdrant still expects float inputs, handles conversion internally.

Args: collection_name: Name of collection to quantize. quantization_type: Type of quantization to apply (“int8” or “binary”). rescore: Whether to enable rescoring for accuracy (default: True).

Raises: ProviderError: If quantization application fails.

### Method: `collection_info`
[Section titled “Method: collection_info”](#method-collection_info)

**

```
collection_info()
```

Get the collection metadata.

### Method: `create_payload_index`
[Section titled “Method: create_payload_index”](#method-create_payload_index)

**

```
create_payload_index()
```

Create a payload index on the specified field.

Args: collection_name: Name of the collection. field_name: Name of the payload field to index. key_type: field value’s data or schema type (what category of data will be indexed)

Raises: ProviderError: Qdrant operation failed.

Returns: UpdateResult: Response from Qdrant after creating the index.

### Method: `delete_by_file`
[Section titled “Method: delete_by_file”](#method-delete_by_file)

**

```
delete_by_file()
```

Delete all chunks for a specific file.

Args: file_path: File path to remove from index.

### Method: `delete_by_files`
[Section titled “Method: delete_by_files”](#method-delete_by_files)

**

```
delete_by_files()
```

Delete all chunks for multiple files in a single operation.

Args: file_paths: List of file paths to remove from index.

### Method: `delete_by_id`
[Section titled “Method: delete_by_id”](#method-delete_by_id)

**

```
delete_by_id()
```

Delete chunks by their unique identifiers.

Args: ids: List of chunk IDs to delete.

### Method: `delete_by_name`
[Section titled “Method: delete_by_name”](#method-delete_by_name)

**

```
delete_by_name()
```

Delete chunks by their unique names.

Args: names: List of chunk names to delete.

### Method: `delete_collection`
[Section titled “Method: delete_collection”](#method-delete_collection)

**

```
delete_collection()
```

Delete a vector store collection.

Args: collection_name: Name of collection to delete. If None, uses configured collection.

Returns: bool: True if collection was deleted, False if it didn’t exist.

Raises: ProviderError: If client is not initialized or operation fails.

### Method: `get_collection`
[Section titled “Method: get_collection”](#method-get_collection)

**

```
get_collection()
```

Get collection details.

Args: collection_name: Name of the collection to retrieve.

Returns: Collection information as CollectionInfo from Qdrant.

Raises: ProviderError: If client is not initialized or operation fails.

### Method: `handle_persistence`
[Section titled “Method: handle_persistence”](#method-handle_persistence)

**

```
handle_persistence()
```

This is no-op, but implemented by the memory provider to trigger persistence.

### Method: `list_collections`
[Section titled “Method: list_collections”](#method-list_collections)

**

```
list_collections()
```

List all collections in the Qdrant instance.

Returns: List of collection names.

Raises: ConnectionError: Failed to connect to Qdrant server. ProviderError: Qdrant operation failed.

### Method: `migrate_from`
[Section titled “Method: migrate_from”](#method-migrate_from)

**

```
migrate_from()
```

Migrate data from a source client to this provider’s client.

Args: source_client: Source Qdrant client. collection_names: Specific collections to migrate (default: all). batch_size: Batch size for scrolling and upserting.

Raises: ProviderError: If client is not initialized.

### Method: `migrate_to`
[Section titled “Method: migrate_to”](#method-migrate_to)

**

```
migrate_to()
```

Migrate data from this provider’s client to a destination client.

Args: dest_client: Destination Qdrant client. collection_names: Specific collections to migrate (default: all). batch_size: Batch size for scrolling and upserting.

Raises: ProviderError: If client is not initialized.

### Method: `search`
[Section titled “Method: search”](#method-search)

**

```
search()
```

Search for similar vectors using dense, sparse, or hybrid search.

Args: vector: Query vector (StrategizedQuery or list of floats/ints or dict for hybrid other inputs will be deprecated in favor of StrategizedQuery in the future). query_filter: Optional filter for search results.

Returns: List of search results sorted by relevance score.

Raises: CollectionNotFoundError: Collection doesn’t exist. SearchError: Search operation failed.

### Method: `upsert`
[Section titled “Method: upsert”](#method-upsert)

**

```
upsert()
```

Insert or update code chunks with hybrid embeddings.

Args: chunks: List of code chunks with embeddings to store.

Raises: CollectionNotFoundError: Collection doesn’t exist. UpsertError: Upsert operation failed.