Add Python snippets

This commit is contained in:
Abdon Pijpelink
2026-05-07 09:36:00 +02:00
parent 94a4968dac
commit 483b384421
6 changed files with 64 additions and 0 deletions
@@ -0,0 +1,12 @@
```python
client.create_vector_name(
collection_name="{collection_name}",
vector_name="{vector_name}",
vector_name_config=models.DenseVectorNameConfig(
dense=models.DenseVectorConfig(
size=256,
distance=models.Distance.COSINE,
),
),
)
```
@@ -0,0 +1,14 @@
from qdrant_client import QdrantClient, models # @hide
client = QdrantClient(url="http://localhost:6333") # @hide
client.create_vector_name(
collection_name="{collection_name}",
vector_name="{vector_name}",
vector_name_config=models.DenseVectorNameConfig(
dense=models.DenseVectorConfig(
size=256,
distance=models.Distance.COSINE,
),
),
)
@@ -0,0 +1,11 @@
```python
client.create_vector_name(
collection_name="{collection_name}",
vector_name="{vector_name}",
vector_name_config=models.SparseVectorNameConfig(
sparse=models.SparseVectorConfig(
modifier=models.Modifier.IDF,
),
),
)
```
@@ -0,0 +1,13 @@
from qdrant_client import QdrantClient, models # @hide
client = QdrantClient(url="http://localhost:6333") # @hide
client.create_vector_name(
collection_name="{collection_name}",
vector_name="{vector_name}",
vector_name_config=models.SparseVectorNameConfig(
sparse=models.SparseVectorConfig(
modifier=models.Modifier.IDF,
),
),
)