mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-09 21:08:31 +02:00
This commit both: - Fixes pre-existing mistakes in snippets, aka wrong code samples. - Adds hidden (`@hide`) statements that do not appear in the docs, but satisfy typecheckers.
20 lines
558 B
Rust
20 lines
558 B
Rust
use qdrant_client::qdrant::{Condition, Filter, SearchMatrixPointsBuilder};
|
|
|
|
pub async fn main() -> anyhow::Result<()> {
|
|
let client = qdrant_client::Qdrant::from_url("http://localhost:6334").build()?; // @hide
|
|
|
|
client
|
|
.search_matrix_pairs(
|
|
SearchMatrixPointsBuilder::new("collection_name")
|
|
.filter(Filter::must(vec![Condition::matches(
|
|
"color",
|
|
"red".to_string(),
|
|
)]))
|
|
.sample(10)
|
|
.limit(2),
|
|
)
|
|
.await?;
|
|
|
|
Ok(())
|
|
}
|