1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#[tokio::test]
async fn test_scroll_points() {
async fn scroll_points() -> Result<(), Box<dyn std::error::Error>> {
// WARNING: This is a generated test snippet.
// Please, modify the snippet in the `../snippets/scroll_points.rs` file
use qdrant_client::qdrant::{Condition, Filter, ScrollPointsBuilder};
use qdrant_client::Qdrant;
let client = Qdrant::from_url("http://localhost:6334").build()?;
client
.scroll(
ScrollPointsBuilder::new("{collection_name}")
.filter(Filter::must([Condition::matches(
"color",
"red".to_string(),
)]))
.limit(1)
.with_payload(true)
.with_vectors(false),
)
.await?;
// Filter points matching any of the text words
client
.scroll(
ScrollPointsBuilder::new("{collection_name}")
.filter(Filter::must([Condition::matches_text_any(
"description",
"machine learning artificial intelligence",
)]))
.limit(10u32),
)
.await?;
Ok(())
}
let _ = scroll_points().await;
}