mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-07 11:58:31 +02:00
Publish docs for version 1.17 (#2137)
* Cluster Telemetry docs (#2068) * mention cluster telemetry * small reword * Docs for read_fan_out_delay_ms * Add warning against setting threshold too low * Small docs change for inference API keys * Trigger Build * Add guide with tips for low latency search (#2136) * Update frontmatter weights * Add 'Tips for Low-Latency Search' guide * Review feedback * Temporarily bump Rust client to v1-17-upgrade branch * Docs for audit logging (#2141) * Docs for audit logging * Consistent title casing * Review feedback * Docs for optimization monitoring (#2121) * Docs for optimization monitoring * Review feedback * Optimization monitoring is cluster-wide now * Upgrade code snippet checker to 1.17 * Fix broken Python snippets * Relevance Feedback docs (#2060) * add relevance feedback in Explore page * Review * Trigger Build * Trigger Build * Create new 'Search Relevance' concept page * Tweaks * Update links to moved content * add rust snippet * TS anippets * Clarification about using point IDs * Add links * Restructure paragraphs * docs: Go snippet Signed-off-by: Anush008 <mail@anush.sh> * docs: Missed Java snippets with C# Signed-off-by: Anush008 <mail@anush.sh> * new: add python snippets * Make Java and Rust snippets testable * Remove unnecessary styling --------- Signed-off-by: Anush008 <mail@anush.sh> Co-authored-by: Evgeniya Sukhodolskaya <suxodolskaya97@gmail.com> Co-authored-by: Abdon Pijpelink <abdon.pijpelink@qdrant.com> Co-authored-by: Ivan Pleshkov <pleshkov.ivan@gmail.com> Co-authored-by: Anush008 <mail@anush.sh> Co-authored-by: George Panchuk <george.panchuk@qdrant.tech> * Docs for enable_hnsw (#2080) * Move 'Filterable HNSW Index' section under 'Vector Index' * Add docs for enable_hnsw * docs: Go snippets Signed-off-by: Anush008 <mail@anush.sh> * docs: Java snippets Signed-off-by: Anush008 <mail@anush.sh> * docs: C# snippets Signed-off-by: Anush008 <mail@anush.sh> * Add Rust snippet * TS snippets * new: add python snippets --------- Signed-off-by: Anush008 <mail@anush.sh> Co-authored-by: Anush008 <mail@anush.sh> Co-authored-by: timvisee <tim@visee.me> Co-authored-by: Ivan Pleshkov <pleshkov.ivan@gmail.com> Co-authored-by: George Panchuk <george.panchuk@qdrant.tech> * Docs for list shard keys API (#2082) * Docs for list shard keys * docs: Go snippets Signed-off-by: Anush008 <mail@anush.sh> * docs: Java snippets Signed-off-by: Anush008 <mail@anush.sh> * docs: C# snippets Signed-off-by: Anush008 <mail@anush.sh> * Add Rust snippet * docs: TS snippets * new: add python snippets --------- Signed-off-by: Anush008 <mail@anush.sh> Co-authored-by: Anush008 <mail@anush.sh> Co-authored-by: timvisee <tim@visee.me> Co-authored-by: Ivan Pleshkov <pleshkov.ivan@gmail.com> Co-authored-by: George Panchuk <george.panchuk@qdrant.tech> * Docs for update_mode (#2097) * Docs for update_mode * docs: C#, Go, Java snippets Signed-off-by: Anush008 <mail@anush.sh> * doc: Remove _ from C# snippet Signed-off-by: Anush008 <mail@anush.sh> * Add Rust snippet * Fix some snippets * Review feedback * ts snippets * new: add python snippets * fix: add generated python.md --------- Signed-off-by: Anush008 <mail@anush.sh> Co-authored-by: Anush008 <mail@anush.sh> Co-authored-by: timvisee <tim@visee.me> Co-authored-by: Ivan Pleshkov <pleshkov.ivan@gmail.com> Co-authored-by: George Panchuk <george.panchuk@qdrant.tech> * Docs for weighted RRF (#2132) * Docs for weighted RRF * docs: Go, Java, C# snippets Signed-off-by: Anush008 <mail@anush.sh> * Add Rust snippet * Apply suggestions from code review Co-authored-by: Luis Cossío <luis.cossio@qdrant.com> * Delete landing_page.sln * Review feedback * ts snippets * new: add python snippets * Trigger Build --------- Signed-off-by: Anush008 <mail@anush.sh> Co-authored-by: Anush008 <mail@anush.sh> Co-authored-by: timvisee <tim@visee.me> Co-authored-by: Luis Cossío <luis.cossio@qdrant.com> Co-authored-by: Ivan Pleshkov <pleshkov.ivan@gmail.com> Co-authored-by: George Panchuk <george.panchuk@qdrant.tech> * Clean up Go and Java snippets * Revert go snippet change; target Go client 1.17.1 * Updated Go snippet * Trigger Build * Update Rust lockfile --------- Signed-off-by: Anush008 <mail@anush.sh> Co-authored-by: Luis Cossío <luis.cossio@qdrant.com> Co-authored-by: Daniel Boros <56868953+dancixx@users.noreply.github.com> Co-authored-by: timvisee <tim@visee.me> Co-authored-by: Evgeniya Sukhodolskaya <suxodolskaya97@gmail.com> Co-authored-by: Ivan Pleshkov <pleshkov.ivan@gmail.com> Co-authored-by: Anush008 <mail@anush.sh> Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
This commit is contained in:
co-authored by
Evgeniya Sukhodolskaya
Ivan Pleshkov
Anush008
George Panchuk
timvisee
Luis Cossío
Daniel Boros
parent
92ff228b79
commit
378837432e
+1
@@ -0,0 +1 @@
|
||||
This code snippet demonstrates a hybrid search functionality that queries points from a collection using two prefetches. It showcases how to combine the results of multiple queries with different vector representations using Reciprocal Rank Fusion (RRF), and custom weights. In this example, the first prefetch is assigned a weight of 3.0, and the second a weight of 1.0. The number of weights must match the number of prefetches.
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
public class Snippet
|
||||
{
|
||||
public static async Task Run()
|
||||
{
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.QueryAsync(
|
||||
collectionName: "{collection_name}",
|
||||
prefetch: new List<PrefetchQuery>
|
||||
{
|
||||
// 2+ prefetches here
|
||||
},
|
||||
query: new Rrf
|
||||
{
|
||||
Weights = {3.0f, 1.0f},
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
```csharp
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.QueryAsync(
|
||||
collectionName: "{collection_name}",
|
||||
prefetch: new List<PrefetchQuery>
|
||||
{
|
||||
// 2+ prefetches here
|
||||
},
|
||||
query: new Rrf
|
||||
{
|
||||
Weights = {3.0f, 1.0f},
|
||||
}
|
||||
);
|
||||
```
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
```go
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
client.Query(context.Background(), &qdrant.QueryPoints{
|
||||
CollectionName: "{collection_name}",
|
||||
Prefetch: []*qdrant.PrefetchQuery{
|
||||
// Prefetches here
|
||||
},
|
||||
Query: qdrant.NewQueryRRF(
|
||||
&qdrant.Rrf{
|
||||
Weights: []float32{3.0, 1.0},
|
||||
}),
|
||||
})
|
||||
```
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
```java
|
||||
import static io.qdrant.client.QueryFactory.rrf;
|
||||
|
||||
import io.qdrant.client.QdrantClient;
|
||||
import io.qdrant.client.QdrantGrpcClient;
|
||||
import io.qdrant.client.grpc.Points.PrefetchQuery;
|
||||
import io.qdrant.client.grpc.Points.QueryPoints;
|
||||
import io.qdrant.client.grpc.Points.Rrf;
|
||||
import java.util.List;
|
||||
|
||||
QdrantClient client = new QdrantClient(QdrantGrpcClient.newBuilder("localhost", 6334, false).build());
|
||||
|
||||
client
|
||||
.queryAsync(
|
||||
QueryPoints.newBuilder()
|
||||
.setCollectionName("{collection_name}")
|
||||
// .addPrefetch(...) <┐
|
||||
// .addPrefetch(...) <┴─ Prefetches here
|
||||
.setQuery(rrf(Rrf.newBuilder().addAllWeights(List.of(3.0f, 1.0f)).build()))
|
||||
.build())
|
||||
.get();
|
||||
```
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
```python
|
||||
from qdrant_client import QdrantClient, models
|
||||
|
||||
client = QdrantClient(url="http://localhost:6333")
|
||||
|
||||
client.query_points(
|
||||
collection_name="{collection_name}",
|
||||
prefetch=[
|
||||
# 2+ prefetches here
|
||||
],
|
||||
query=models.RrfQuery(rrf=models.Rrf(weights=[3.0, 1.0])),
|
||||
)
|
||||
```
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
```rust
|
||||
use qdrant_client::qdrant::{Query, QueryPointsBuilder, RrfBuilder};
|
||||
use qdrant_client::Qdrant;
|
||||
|
||||
let client = Qdrant::from_url("http://localhost:6334").build()?;
|
||||
|
||||
client
|
||||
.query(
|
||||
QueryPointsBuilder::new("{collection_name}")
|
||||
// .add_prefetch(...) <┐
|
||||
// .add_prefetch(...) <┴─ 2+ prefetches here
|
||||
.query(Query::new_rrf(RrfBuilder::new().weights(vec![3.0, 1.0]))),
|
||||
)
|
||||
.await?;
|
||||
```
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
```typescript
|
||||
import { QdrantClient } from "@qdrant/js-client-rest";
|
||||
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 });
|
||||
|
||||
client.query("{collection_name}", {
|
||||
prefetch: [
|
||||
// Prefetches here
|
||||
],
|
||||
query: {
|
||||
rrf: {
|
||||
weights: [3.0, 1.0],
|
||||
},
|
||||
},
|
||||
limit: 10,
|
||||
});
|
||||
```
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package snippet
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
func Main() {
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
// @hide-start
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
// @hide-end
|
||||
|
||||
client.Query(context.Background(), &qdrant.QueryPoints{
|
||||
CollectionName: "{collection_name}",
|
||||
Prefetch: []*qdrant.PrefetchQuery{
|
||||
// Prefetches here
|
||||
},
|
||||
Query: qdrant.NewQueryRRF(
|
||||
&qdrant.Rrf{
|
||||
Weights: []float32{3.0, 1.0},
|
||||
}),
|
||||
})
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
```http
|
||||
POST /collections/{collection_name}/points/query
|
||||
{
|
||||
"prefetch": [
|
||||
// Prefetches here
|
||||
],
|
||||
"query": {
|
||||
"rrf": {
|
||||
"weights": [3.0, 1.0]
|
||||
}
|
||||
},
|
||||
"limit": 10
|
||||
}
|
||||
```
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.example.snippets_amalgamation;
|
||||
|
||||
import static io.qdrant.client.QueryFactory.rrf;
|
||||
|
||||
import io.qdrant.client.QdrantClient;
|
||||
import io.qdrant.client.QdrantGrpcClient;
|
||||
import io.qdrant.client.grpc.Points.PrefetchQuery;
|
||||
import io.qdrant.client.grpc.Points.QueryPoints;
|
||||
import io.qdrant.client.grpc.Points.Rrf;
|
||||
import java.util.List;
|
||||
|
||||
public class Snippet {
|
||||
public static void run() throws Exception {
|
||||
QdrantClient client = new QdrantClient(QdrantGrpcClient.newBuilder("localhost", 6334, false).build());
|
||||
|
||||
client
|
||||
.queryAsync(
|
||||
QueryPoints.newBuilder()
|
||||
.setCollectionName("{collection_name}")
|
||||
// .addPrefetch(...) <┐
|
||||
// .addPrefetch(...) <┴─ Prefetches here
|
||||
.setQuery(rrf(Rrf.newBuilder().addAllWeights(List.of(3.0f, 1.0f)).build()))
|
||||
.build())
|
||||
.get();
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
from qdrant_client import QdrantClient, models
|
||||
|
||||
client = QdrantClient(url="http://localhost:6333")
|
||||
|
||||
client.query_points(
|
||||
collection_name="{collection_name}",
|
||||
prefetch=[
|
||||
# 2+ prefetches here
|
||||
],
|
||||
query=models.RrfQuery(rrf=models.Rrf(weights=[3.0, 1.0])),
|
||||
)
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
use qdrant_client::qdrant::{Query, QueryPointsBuilder, RrfBuilder};
|
||||
use qdrant_client::Qdrant;
|
||||
|
||||
pub async fn main() -> anyhow::Result<()> {
|
||||
let client = Qdrant::from_url("http://localhost:6334").build()?;
|
||||
|
||||
client
|
||||
.query(
|
||||
QueryPointsBuilder::new("{collection_name}")
|
||||
// .add_prefetch(...) <┐
|
||||
// .add_prefetch(...) <┴─ 2+ prefetches here
|
||||
.query(Query::new_rrf(RrfBuilder::new().weights(vec![3.0, 1.0]))),
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
import { QdrantClient } from "@qdrant/js-client-rest";
|
||||
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 });
|
||||
|
||||
client.query("{collection_name}", {
|
||||
prefetch: [
|
||||
// Prefetches here
|
||||
],
|
||||
query: {
|
||||
rrf: {
|
||||
weights: [3.0, 1.0],
|
||||
},
|
||||
},
|
||||
limit: 10,
|
||||
});
|
||||
Reference in New Issue
Block a user