Regenerate snippet .md files

Run `./generate-md.py` to update generated markdown files after
semi-manual changes made in the previous commit.
This commit serves as a gist of fixed issues found in snippets.

(it's easier to review 250 lines diff rather than 31k lines diff, isn't it?)
This commit is contained in:
xzfc
2025-11-28 22:02:34 +00:00
parent 74a785218b
commit 178a9bae72
164 changed files with 248 additions and 220 deletions
@@ -1,6 +1,5 @@
```rust
use qdrant_client::qdrant::{Condition, Filter, QueryPointsBuilder, SearchParamsBuilder};
use qdrant_client::Qdrant;
client
.query(
@@ -1,6 +1,6 @@
```rust
use qdrant_client::Qdrant;
use qdrant_client::qdrant::{LookupLocationBuilder, PointId, Query, QueryPointsBuilder};
use qdrant_client::qdrant::{LookupLocationBuilder, Query, QueryPointsBuilder};
let client = Qdrant::from_url("http://localhost:6334").build()?;
@@ -1,13 +1,13 @@
```rust
use qdrant_client::Qdrant;
use qdrant_client::qdrant::{Condition, Filter, PointId, Query, QueryPointsBuilder};
use qdrant_client::qdrant::{PointId, Query, QueryPointsBuilder};
let client = Qdrant::from_url("http://localhost:6334").build()?;
client
.query(
QueryPointsBuilder::new("{collection_name}")
.query(Query::new_nearest(PointId::new("43cf51e2-8777-4f52-bc74-c2cbde0c8b04")))
.query(Query::new_nearest(PointId::from("43cf51e2-8777-4f52-bc74-c2cbde0c8b04")))
)
.await?;
```
@@ -1,6 +1,6 @@
```rust
use qdrant_client::Qdrant;
use qdrant_client::qdrant::{PrefetchQueryBuilder, Query, QueryPointsBuilder};
use qdrant_client::qdrant::{MmrBuilder, Query, QueryPointsBuilder};
let client = Qdrant::from_url("http://localhost:6334").build()?;
@@ -5,7 +5,7 @@ const client = new QdrantClient({ host: "localhost", port: 6333 });
client.query("{collection_name}", {
query: {
nearest: [0.01, 0.45, 0.67, ...], // search vector
nearest: [0.01, 0.45, 0.67], // search vector
mmr: {
diversity: 0.5, // 0.0 - relevance; 1.0 - diversity
candidates_limit: 100 // num of candidates to preselect
@@ -1,6 +1,6 @@
```rust
use qdrant_client::Qdrant;
use qdrant_client::qdrant::{Rrf, PrefetchQueryBuilder, Query, QueryPointsBuilder};
use qdrant_client::qdrant::{RrfBuilder, Query, QueryPointsBuilder};
let client = Qdrant::from_url("http://localhost:6334").build()?;
@@ -8,6 +8,6 @@ client.query(
QueryPointsBuilder::new("{collection_name}")
// .add_prefetch(...) <┐
// .add_prefetch(...) <┴─ 2+ prefetches here
.query(Query::new_rrf(RrfBuilder::with_k(60))
.query(Query::new_rrf(RrfBuilder::with_k(60)))
).await?;
```
@@ -7,7 +7,7 @@ await client.QueryAsync(
collectionName: "{collection_name}",
query: new float[][] {
[-0.013f, 0.020f, -0.007f, -0.111f],
[-0.030f, -0.055f, 0.001 , 0.072f],
[-0.030f, -0.055f, 0.001f, 0.072f],
[-0.041f, 0.014f, -0.032f, -0.062f],
}
);
@@ -1,6 +1,8 @@
```python
from qdrant_client import QdrantClient, models
client = QdrantClient(url="http://localhost:6333")
sampled = client.query_points(
collection_name="{collection_name}",
query=models.SampleQuery(sample=models.Sample.RANDOM)
@@ -1,6 +1,6 @@
```rust
use qdrant_client::Qdrant;
use qdrant_client::qdrant::{Query, QueryPointsBuilder};
use qdrant_client::qdrant::{Query, QueryPointsBuilder, Sample};
let client = Qdrant::from_url("http://localhost:6334").build()?;
@@ -17,6 +17,7 @@ import io.qdrant.client.grpc.Points.GeoDistance;
import io.qdrant.client.grpc.Points.PrefetchQuery;
import io.qdrant.client.grpc.Points.QueryPoints;
import io.qdrant.client.grpc.Points.SumExpression;
import java.util.Map;
QdrantClient client =
new QdrantClient(QdrantGrpcClient.newBuilder("localhost", 6334, false).build());
@@ -4,7 +4,7 @@ from qdrant_client import QdrantClient, models
geo_boosted = client.query_points(
collection_name="{collection_name}",
prefetch=models.Prefetch(
query=[0.2, 0.8, ...], # <-- dense vector
query=[0.1, 0.45, 0.67], # <-- dense vector
limit=50
),
query=models.FormulaQuery(
@@ -3,9 +3,9 @@ import { QdrantClient } from "@qdrant/js-client-rest";
const client = new QdrantClient({ host: "localhost", port: 6333 });
const distance_boosted = await client.query(collectionName, {
const distance_boosted = await client.query("{collection_name}", {
prefetch: {
query: [0.2, 0.8, ...],
query: [0.1, 0.45, 0.67],
limit: 50
},
query: {
@@ -4,7 +4,7 @@ from qdrant_client import QdrantClient, models
tag_boosted = client.query_points(
collection_name="{collection_name}",
prefetch=models.Prefetch(
query=[0.2, 0.8, ...], # <-- dense vector
query=[0.1, 0.45, 0.67], # <-- dense vector
limit=50
),
query=models.FormulaQuery(
@@ -3,7 +3,7 @@ import { QdrantClient } from "@qdrant/js-client-rest";
const client = new QdrantClient({ host: "localhost", port: 6333 });
const tag_boosted = await client.query(collectionName, {
const tag_boosted = await client.query("{collection_name}", {
prefetch: {
query: [0.2, 0.8, 0.1, 0.9],
limit: 50
@@ -8,7 +8,10 @@ await client.QueryAsync(
collectionName: "{collection_name}",
prefetch:
[
new PrefetchQuery { Query = new float[] { 0.2f, 0.8f, ..., .. }, Limit = 50 }, // <-- dense vector
new PrefetchQuery {
Query = new float[] { 0.1f, 0.45f, 0.67f }, // <-- dense vector
Limit = 50
},
],
query: new Formula
{
@@ -14,7 +14,7 @@ client.Query(context.Background(), &qdrant.QueryPoints{
CollectionName: "{collection_name}",
Prefetch: []*qdrant.PrefetchQuery{
{
Query: qdrant.NewQuery(0.2, 0.8, .., ...), // <-- dense vector
Query: qdrant.NewQuery(0.1, 0.45, 0.67), // <-- dense vector
Limit: qdrant.PtrOf(uint64(50)),
},
},
@@ -22,10 +22,10 @@ QdrantClient client =
List<ScoredPoint> time_boosted = client.queryAsync(
QueryPoints.newBuilder()
.setCollectionName({collection_name})
.setCollectionName("{collection_name}")
.addPrefetch(
PrefetchQuery.newBuilder()
.setQuery(nearest(0.2f, 0.8f, .., ..)) // <-- dense vector
.setQuery(nearest(0.1f, 0.45f, 0.67f)) // <-- dense vector
.setLimit(50)
.build())
.setQuery(
@@ -4,7 +4,7 @@ from qdrant_client import QdrantClient, models
time_boosted = client.query_points(
collection_name="{collection_name}",
prefetch=models.Prefetch(
query=[0.2, 0.8, ...], # <-- dense vector
query=[0.1, 0.45, 0.67], # <-- dense vector
limit=50
),
query=models.FormulaQuery(
@@ -10,7 +10,7 @@ let _geo_boosted = client.query(
QueryPointsBuilder::new("{collection_name}")
.add_prefetch(
PrefetchQueryBuilder::default()
.query(vec![0.2, 0.8, .., ..]) // <-- dense vector
.query(vec![0.1, 0.45, 0.67]) // <-- dense vector
.limit(50u64),
)
.query(
@@ -3,9 +3,9 @@ import { QdrantClient } from "@qdrant/js-client-rest";
const client = new QdrantClient({ host: "localhost", port: 6333 });
const time_boosted = await client.query(collectionName, {
const time_boosted = await client.query('collectionName', {
prefetch: {
query: [0.2, 0.8, ...], // <-- dense vector
query: [0.1, 0.45, 0.67], // <-- dense vector
limit: 50
},
query: {
@@ -1,6 +1,6 @@
```rust
use qdrant_client::Qdrant;
use qdrant_client::qdrant::{Condition, Filter, Query, QueryPointsBuilder};
use qdrant_client::qdrant::{Query, QueryPointsBuilder};
let client = Qdrant::from_url("http://localhost:6334").build()?;
@@ -1,6 +1,5 @@
```rust
use qdrant_client::qdrant::{with_payload_selector::SelectorOptions, QueryPointsBuilder};
use qdrant_client::Qdrant;
client
.query(