mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-05 10:58:32 +02:00
Clean up Edge code snippets (#2084)
This commit is contained in:
@@ -32,11 +32,8 @@ An Edge Shard is configured with a definition of the dense and sparse vectors th
|
||||
```python
|
||||
from qdrant_edge import (
|
||||
Distance,
|
||||
PayloadStorageType,
|
||||
PlainIndexConfig,
|
||||
EdgeConfig,
|
||||
VectorDataConfig,
|
||||
VectorStorageType
|
||||
)
|
||||
|
||||
VECTOR_NAME="my-vector"
|
||||
|
||||
@@ -91,14 +91,10 @@ First, initialize:
|
||||
Initialize an Edge Shard:
|
||||
```python
|
||||
from pathlib import Path
|
||||
from qdrant_edge import (
|
||||
Distance,
|
||||
EdgeShard,
|
||||
PayloadStorageType,
|
||||
PlainIndexConfig,
|
||||
EdgeConfig,
|
||||
VectorDataConfig,
|
||||
VectorStorageType
|
||||
from qdrant_edge import (
|
||||
Distance,
|
||||
EdgeConfig,
|
||||
VectorDataConfig,
|
||||
)
|
||||
|
||||
SHARD_DIRECTORY = "./qdrant-edge-directory"
|
||||
@@ -157,9 +153,9 @@ vector=[0.1, 0.2, 0.3, 0.4]
|
||||
payload={"color": "red"}
|
||||
|
||||
point = Point(
|
||||
id=1,
|
||||
id=id,
|
||||
vector={VECTOR_NAME: vector},
|
||||
payload={"color": "red"}
|
||||
payload=payload
|
||||
)
|
||||
|
||||
edge_shard.update(UpdateOperation.upsert_points([point]))
|
||||
|
||||
Reference in New Issue
Block a user