mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-09 21:08:31 +02:00
Edge v0.6 docs (#2199)
* Initial Rust snippets * Update content for Rust * Upgrade Rust to 1.94.0; test Edge code snippets against dev * Temporarily test against Edge shim crate * Move to EdgeShardConfig and EdgeVectorParams * Add docs for payload indexing, filtering, facet(), and optimize() * De-emphasize on-device use case * Update link to Rust examples on Github * Flattened API * Switch to new/create and load to initialize shards * Fixups for released packages * Mention recover_partial_snapshot on method list * Link to Github dev branch for examples --------- Co-authored-by: xzfc <xzfcpw@gmail.com>
This commit is contained in:
+4
-4
@@ -4,7 +4,7 @@ from qdrant_edge import (
|
||||
Distance,
|
||||
EdgeConfig,
|
||||
EdgeShard,
|
||||
VectorDataConfig,
|
||||
EdgeVectorParams,
|
||||
)
|
||||
|
||||
SHARD_DIRECTORY = "./qdrant-edge-directory"
|
||||
@@ -13,13 +13,13 @@ VECTOR_NAME="my-vector"
|
||||
|
||||
Path(SHARD_DIRECTORY).mkdir(parents=True, exist_ok=True)
|
||||
config = EdgeConfig(
|
||||
vector_data={
|
||||
VECTOR_NAME: VectorDataConfig(
|
||||
vectors={
|
||||
VECTOR_NAME: EdgeVectorParams(
|
||||
size=VECTOR_DIMENSION,
|
||||
distance=Distance.Cosine,
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
edge_shard = EdgeShard(SHARD_DIRECTORY, config)
|
||||
edge_shard = EdgeShard.create(SHARD_DIRECTORY, config)
|
||||
```
|
||||
|
||||
+4
-4
@@ -20,7 +20,7 @@ from qdrant_edge import (
|
||||
Distance,
|
||||
EdgeConfig,
|
||||
EdgeShard,
|
||||
VectorDataConfig,
|
||||
EdgeVectorParams,
|
||||
)
|
||||
|
||||
SHARD_DIRECTORY = "./qdrant-edge-directory"
|
||||
@@ -29,15 +29,15 @@ VECTOR_NAME="my-vector"
|
||||
|
||||
Path(SHARD_DIRECTORY).mkdir(parents=True, exist_ok=True)
|
||||
config = EdgeConfig(
|
||||
vector_data={
|
||||
VECTOR_NAME: VectorDataConfig(
|
||||
vectors={
|
||||
VECTOR_NAME: EdgeVectorParams(
|
||||
size=VECTOR_DIMENSION,
|
||||
distance=Distance.Cosine,
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
edge_shard = EdgeShard(SHARD_DIRECTORY, config)
|
||||
edge_shard = EdgeShard.create(SHARD_DIRECTORY, config)
|
||||
|
||||
from pathlib import Path
|
||||
from qdrant_edge import Point, UpdateOperation
|
||||
|
||||
@@ -22,7 +22,7 @@ from qdrant_edge import (
|
||||
Distance,
|
||||
EdgeConfig,
|
||||
EdgeShard,
|
||||
VectorDataConfig,
|
||||
EdgeVectorParams,
|
||||
)
|
||||
|
||||
SHARD_DIRECTORY = "./qdrant-edge-directory"
|
||||
@@ -31,15 +31,15 @@ VECTOR_NAME="my-vector"
|
||||
|
||||
Path(SHARD_DIRECTORY).mkdir(parents=True, exist_ok=True)
|
||||
config = EdgeConfig(
|
||||
vector_data={
|
||||
VECTOR_NAME: VectorDataConfig(
|
||||
vectors={
|
||||
VECTOR_NAME: EdgeVectorParams(
|
||||
size=VECTOR_DIMENSION,
|
||||
distance=Distance.Cosine,
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
edge_shard = EdgeShard(SHARD_DIRECTORY, config)
|
||||
edge_shard = EdgeShard.create(SHARD_DIRECTORY, config)
|
||||
# @block-end initialize-edge-shard
|
||||
|
||||
# @block-start embed-and-store-image
|
||||
|
||||
Reference in New Issue
Block a user