Skip to content

Commit b4c8d40

Browse files
authored
docs: update doc for Qdrant to reflect latest spec change (#581)
1 parent 9dd6eae commit b4c8d40

File tree

1 file changed

+8
-21
lines changed

1 file changed

+8
-21
lines changed

docs/docs/ops/storages.md

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -54,34 +54,21 @@ Here's how CocoIndex data elements map to Qdrant elements during export:
5454
|-------------------|------------------|
5555
| an export target | a unique collection |
5656
| a collected row | a point |
57-
| a field | a named vector (for fields with vector type); a field within payload (otherwise) |
57+
| a field | a named vector, if fits into Qdrant vector; or a field within payload otherwise |
58+
59+
A vector with `Float32`, `Float64` or `Int64` type, and with fixed dimension, fits into Qdrant vector.
5860

5961
#### Spec
6062

6163
The spec takes the following fields:
6264

63-
* `collection_name` (type: `str`, required): The name of the collection to export the data to.
64-
65-
* `grpc_url` (type: `str`, optional): The [gRPC URL](https://qdrant.tech/documentation/interfaces/#grpc-interface) of the Qdrant instance. Defaults to `http://localhost:6334/`.
66-
67-
* `api_key` (type: `str`, optional). API key to authenticate requests with.
68-
69-
Before exporting, you must create a collection with a [vector name](https://qdrant.tech/documentation/concepts/vectors/#named-vectors) that matches the vector field name in CocoIndex, and set `setup_by_user=True` during export.
65+
* `connection` (type: [auth reference](../core/flow_def#auth-registry) to `QdrantConnection`, optional): The connection to the Qdrant instance. `QdrantConnection` has the following fields:
66+
* `grpc_url` (type: `str`): The [gRPC URL](https://qdrant.tech/documentation/interfaces/#grpc-interface) of the Qdrant instance, e.g. `http://localhost:6334/`.
67+
* `api_key` (type: `str`, optional). API key to authenticate requests with.
7068

71-
Example:
69+
If `connection` is not provided, will use local Qdrant instance at `http://localhost:6334/` by default.
7270

73-
```python
74-
doc_embeddings.export(
75-
"doc_embeddings",
76-
cocoindex.storages.Qdrant(
77-
collection_name="cocoindex",
78-
grpc_url="https://xyz-example.cloud-region.cloud-provider.cloud.qdrant.io:6334/",
79-
api_key="<your-api-key-here>",
80-
),
81-
primary_key_fields=["id_field"],
82-
setup_by_user=True,
83-
)
84-
```
71+
* `collection_name` (type: `str`, required): The name of the collection to export the data to.
8572

8673
You can find an end-to-end example [here](https://github.com/cocoindex-io/cocoindex/tree/main/examples/text_embedding_qdrant).
8774

0 commit comments

Comments
 (0)