chore: simplify snippets

This commit is contained in:
Daniel Boros
2025-11-13 12:38:15 +01:00
parent 5d5ec2985d
commit 8c67b4376d
3 changed files with 4 additions and 6 deletions
@@ -3,7 +3,6 @@ use qdrant_client::{
Payload, Qdrant, QdrantError,
qdrant::{Document, PointStruct, UpsertPointsBuilder},
};
use std::collections::HashMap;
let client = Qdrant::from_url("http://localhost:6333").build()?;
@@ -15,7 +14,7 @@ client
Document {
text: "Recipe for baking chocolate chip cookies".into(),
model: "qdrant/bm25".into(),
options: HashMap::new(),
..Default::default()
}.into())]),
Payload::default())
]))
@@ -31,7 +31,7 @@ client
Document {
text: "Mars, the red planet".into(),
model: "sentence-transformers/all-minilm-l6-v2".into(),
options: HashMap::new(),
..Default::default()
},
)
.add_vector(
@@ -39,7 +39,7 @@ client
Document {
text: "How to bake cookies?".into(),
model: "qdrant/bm25".into(),
options: HashMap::new(),
..Default::default()
},
),
Payload::default(),
@@ -3,7 +3,6 @@ use qdrant_client::{
Qdrant, QdrantError,
qdrant::{Document, Query, QueryPointsBuilder},
};
use std::collections::HashMap;
let client = Qdrant::from_url("http://localhost:6333").build().unwrap();
@@ -13,7 +12,7 @@ client
.query(Query::new_nearest(Document {
text: "How to bake cookies?".into(),
model: "qdrant/bm25".into(),
options: HashMap::new(),
..Default::default()
}))
.using("my-bm25-vector")
.build(),