mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-09 21:08: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
+3
-3
@@ -6,9 +6,9 @@ client
|
||||
UpsertPointsBuilder::new(
|
||||
"{collection_name}",
|
||||
vec![
|
||||
PointStruct::new(1, vec![0.9, 0.1, 0.1], [("city", "red".into())]),
|
||||
PointStruct::new(2, vec![0.1, 0.9, 0.1], [("city", "green".into())]),
|
||||
PointStruct::new(3, vec![0.1, 0.1, 0.9], [("city", "blue".into())]),
|
||||
PointStruct::new(1, vec![0.9, 0.1, 0.1], [("color", "red".into())]),
|
||||
PointStruct::new(2, vec![0.1, 0.9, 0.1], [("color", "green".into())]),
|
||||
PointStruct::new(3, vec![0.1, 0.1, 0.9], [("color", "blue".into())]),
|
||||
],
|
||||
)
|
||||
.wait(true),
|
||||
|
||||
+3
-3
@@ -8,9 +8,9 @@ pub async fn main() -> anyhow::Result<()> {
|
||||
UpsertPointsBuilder::new(
|
||||
"{collection_name}",
|
||||
vec![
|
||||
PointStruct::new(1, vec![0.9, 0.1, 0.1], [("city", "red".into())]),
|
||||
PointStruct::new(2, vec![0.1, 0.9, 0.1], [("city", "green".into())]),
|
||||
PointStruct::new(3, vec![0.1, 0.1, 0.9], [("city", "blue".into())]),
|
||||
PointStruct::new(1, vec![0.9, 0.1, 0.1], [("color", "red".into())]),
|
||||
PointStruct::new(2, vec![0.1, 0.9, 0.1], [("color", "green".into())]),
|
||||
PointStruct::new(3, vec![0.1, 0.1, 0.9], [("color", "blue".into())]),
|
||||
],
|
||||
)
|
||||
.wait(true),
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
Shows how to set the update mode when upserting points into a collection. Update mode is set to `insert_only` in this example, which means that only new points will be inserted; existing points with the same IDs will be ignored. Other valid values for `update_mode` are `upsert` (default) and `update_only`.
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
public class Snippet
|
||||
{
|
||||
public static async Task Run()
|
||||
{
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.UpsertAsync(
|
||||
new()
|
||||
{
|
||||
CollectionName = "{collection_name}",
|
||||
Points =
|
||||
{
|
||||
new List<PointStruct>
|
||||
{
|
||||
new()
|
||||
{
|
||||
Id = 1,
|
||||
Vectors = new[] { 0.9f, 0.1f, 0.1f },
|
||||
Payload = { ["color"] = "red" },
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 2,
|
||||
Vectors = new[] { 0.1f, 0.9f, 0.1f },
|
||||
Payload = { ["color"] = "green" },
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 3,
|
||||
Vectors = new[] { 0.1f, 0.1f, 0.9f },
|
||||
Payload = { ["color"] = "blue" },
|
||||
},
|
||||
},
|
||||
},
|
||||
UpdateMode = UpdateMode.InsertOnly,
|
||||
Wait = true,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
```csharp
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.UpsertAsync(
|
||||
new()
|
||||
{
|
||||
CollectionName = "{collection_name}",
|
||||
Points =
|
||||
{
|
||||
new List<PointStruct>
|
||||
{
|
||||
new()
|
||||
{
|
||||
Id = 1,
|
||||
Vectors = new[] { 0.9f, 0.1f, 0.1f },
|
||||
Payload = { ["color"] = "red" },
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 2,
|
||||
Vectors = new[] { 0.1f, 0.9f, 0.1f },
|
||||
Payload = { ["color"] = "green" },
|
||||
},
|
||||
new()
|
||||
{
|
||||
Id = 3,
|
||||
Vectors = new[] { 0.1f, 0.1f, 0.9f },
|
||||
Payload = { ["color"] = "blue" },
|
||||
},
|
||||
},
|
||||
},
|
||||
UpdateMode = UpdateMode.InsertOnly,
|
||||
Wait = true,
|
||||
}
|
||||
);
|
||||
```
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
```go
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
client.Upsert(context.Background(), &qdrant.UpsertPoints{
|
||||
CollectionName: "{collection_name}",
|
||||
Points: []*qdrant.PointStruct{
|
||||
{
|
||||
Id: qdrant.NewIDNum(1),
|
||||
Vectors: qdrant.NewVectors(0.9, 0.1, 0.1),
|
||||
Payload: qdrant.NewValueMap(map[string]any{"color": "red"}),
|
||||
},
|
||||
{
|
||||
Id: qdrant.NewIDNum(2),
|
||||
Vectors: qdrant.NewVectors(0.1, 0.9, 0.1),
|
||||
Payload: qdrant.NewValueMap(map[string]any{"color": "green"}),
|
||||
},
|
||||
{
|
||||
Id: qdrant.NewIDNum(3),
|
||||
Vectors: qdrant.NewVectors(0.1, 0.1, 0.9),
|
||||
Payload: qdrant.NewValueMap(map[string]any{"color": "blue"}),
|
||||
},
|
||||
},
|
||||
UpdateMode: qdrant.UpdateMode_InsertOnly.Enum(),
|
||||
})
|
||||
```
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
```java
|
||||
import static io.qdrant.client.PointIdFactory.id;
|
||||
import static io.qdrant.client.ValueFactory.value;
|
||||
import static io.qdrant.client.VectorsFactory.vectors;
|
||||
|
||||
import io.qdrant.client.QdrantClient;
|
||||
import io.qdrant.client.QdrantGrpcClient;
|
||||
import io.qdrant.client.grpc.Points.PointStruct;
|
||||
import io.qdrant.client.grpc.Points.UpdateMode;
|
||||
import io.qdrant.client.grpc.Points.UpsertPoints;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
QdrantClient client =
|
||||
new QdrantClient(QdrantGrpcClient.newBuilder("localhost", 6334, false).build());
|
||||
|
||||
client
|
||||
.upsertAsync(
|
||||
UpsertPoints.newBuilder()
|
||||
.setCollectionName("{collection_name}")
|
||||
.addAllPoints(
|
||||
List.of(
|
||||
PointStruct.newBuilder()
|
||||
.setId(id(1))
|
||||
.setVectors(vectors(0.9f, 0.1f, 0.1f))
|
||||
.putAllPayload(Map.of("color", value("red")))
|
||||
.build(),
|
||||
PointStruct.newBuilder()
|
||||
.setId(id(2))
|
||||
.setVectors(vectors(0.1f, 0.9f, 0.1f))
|
||||
.putAllPayload(Map.of("color", value("green")))
|
||||
.build(),
|
||||
PointStruct.newBuilder()
|
||||
.setId(id(3))
|
||||
.setVectors(vectors(0.1f, 0.1f, 0.9f))
|
||||
.putAllPayload(Map.of("color", value("blue")))
|
||||
.build()))
|
||||
.setUpdateMode(UpdateMode.InsertOnly)
|
||||
.build())
|
||||
.get();
|
||||
```
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
```python
|
||||
client.upsert(
|
||||
collection_name="{collection_name}",
|
||||
points=[
|
||||
models.PointStruct(
|
||||
id=1,
|
||||
vector=[0.9, 0.1, 0.1],
|
||||
payload={
|
||||
"color": "red",
|
||||
},
|
||||
),
|
||||
models.PointStruct(
|
||||
id=2,
|
||||
vector=[0.1, 0.9, 0.1],
|
||||
payload={
|
||||
"color": "green",
|
||||
},
|
||||
),
|
||||
models.PointStruct(
|
||||
id=3,
|
||||
vector=[0.1, 0.1, 0.9],
|
||||
payload={
|
||||
"color": "blue",
|
||||
},
|
||||
),
|
||||
],
|
||||
update_mode=models.UpdateMode.INSERT_ONLY
|
||||
)
|
||||
```
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
```rust
|
||||
use qdrant_client::qdrant::{PointStruct, UpdateMode, UpsertPointsBuilder};
|
||||
|
||||
client
|
||||
.upsert_points(
|
||||
UpsertPointsBuilder::new(
|
||||
"{collection_name}",
|
||||
vec![
|
||||
PointStruct::new(1, vec![0.9, 0.1, 0.1], [("color", "red".into())]),
|
||||
PointStruct::new(2, vec![0.1, 0.9, 0.1], [("color", "green".into())]),
|
||||
PointStruct::new(3, vec![0.1, 0.1, 0.9], [("color", "blue".into())]),
|
||||
],
|
||||
)
|
||||
.update_mode(UpdateMode::InsertOnly),
|
||||
)
|
||||
.await?;
|
||||
```
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
```typescript
|
||||
import { QdrantClient } from "@qdrant/js-client-rest";
|
||||
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 });
|
||||
|
||||
client.upsert("{collection_name}", {
|
||||
points: [
|
||||
{
|
||||
id: 1,
|
||||
payload: { color: "red" },
|
||||
vector: [0.9, 0.1, 0.1],
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
payload: { color: "green" },
|
||||
vector: [0.1, 0.9, 0.1],
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
payload: { color: "blue" },
|
||||
vector: [0.1, 0.1, 0.9],
|
||||
},
|
||||
],
|
||||
update_mode: "insert_only",
|
||||
});
|
||||
```
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
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.Upsert(context.Background(), &qdrant.UpsertPoints{
|
||||
CollectionName: "{collection_name}",
|
||||
Points: []*qdrant.PointStruct{
|
||||
{
|
||||
Id: qdrant.NewIDNum(1),
|
||||
Vectors: qdrant.NewVectors(0.9, 0.1, 0.1),
|
||||
Payload: qdrant.NewValueMap(map[string]any{"color": "red"}),
|
||||
},
|
||||
{
|
||||
Id: qdrant.NewIDNum(2),
|
||||
Vectors: qdrant.NewVectors(0.1, 0.9, 0.1),
|
||||
Payload: qdrant.NewValueMap(map[string]any{"color": "green"}),
|
||||
},
|
||||
{
|
||||
Id: qdrant.NewIDNum(3),
|
||||
Vectors: qdrant.NewVectors(0.1, 0.1, 0.9),
|
||||
Payload: qdrant.NewValueMap(map[string]any{"color": "blue"}),
|
||||
},
|
||||
},
|
||||
UpdateMode: qdrant.UpdateMode_InsertOnly.Enum(),
|
||||
})
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
```http
|
||||
PUT /collections/{collection_name}/points
|
||||
{
|
||||
"points": [
|
||||
{
|
||||
"id": 1,
|
||||
"payload": {"color": "red"},
|
||||
"vector": [0.9, 0.1, 0.1]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"payload": {"color": "green"},
|
||||
"vector": [0.1, 0.9, 0.1]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"payload": {"color": "blue"},
|
||||
"vector": [0.1, 0.1, 0.9]
|
||||
}
|
||||
],
|
||||
"update_mode": "insert_only"
|
||||
}
|
||||
```
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.example.snippets_amalgamation;
|
||||
|
||||
import static io.qdrant.client.PointIdFactory.id;
|
||||
import static io.qdrant.client.ValueFactory.value;
|
||||
import static io.qdrant.client.VectorsFactory.vectors;
|
||||
|
||||
import io.qdrant.client.QdrantClient;
|
||||
import io.qdrant.client.QdrantGrpcClient;
|
||||
import io.qdrant.client.grpc.Points.PointStruct;
|
||||
import io.qdrant.client.grpc.Points.UpdateMode;
|
||||
import io.qdrant.client.grpc.Points.UpsertPoints;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class Snippet {
|
||||
public static void run() throws Exception {
|
||||
QdrantClient client =
|
||||
new QdrantClient(QdrantGrpcClient.newBuilder("localhost", 6334, false).build());
|
||||
|
||||
client
|
||||
.upsertAsync(
|
||||
UpsertPoints.newBuilder()
|
||||
.setCollectionName("{collection_name}")
|
||||
.addAllPoints(
|
||||
List.of(
|
||||
PointStruct.newBuilder()
|
||||
.setId(id(1))
|
||||
.setVectors(vectors(0.9f, 0.1f, 0.1f))
|
||||
.putAllPayload(Map.of("color", value("red")))
|
||||
.build(),
|
||||
PointStruct.newBuilder()
|
||||
.setId(id(2))
|
||||
.setVectors(vectors(0.1f, 0.9f, 0.1f))
|
||||
.putAllPayload(Map.of("color", value("green")))
|
||||
.build(),
|
||||
PointStruct.newBuilder()
|
||||
.setId(id(3))
|
||||
.setVectors(vectors(0.1f, 0.1f, 0.9f))
|
||||
.putAllPayload(Map.of("color", value("blue")))
|
||||
.build()))
|
||||
.setUpdateMode(UpdateMode.InsertOnly)
|
||||
.build())
|
||||
.get();
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
from qdrant_client import QdrantClient, models # @hide
|
||||
|
||||
client = QdrantClient(url="http://localhost:6333") # @hide
|
||||
|
||||
client.upsert(
|
||||
collection_name="{collection_name}",
|
||||
points=[
|
||||
models.PointStruct(
|
||||
id=1,
|
||||
vector=[0.9, 0.1, 0.1],
|
||||
payload={
|
||||
"color": "red",
|
||||
},
|
||||
),
|
||||
models.PointStruct(
|
||||
id=2,
|
||||
vector=[0.1, 0.9, 0.1],
|
||||
payload={
|
||||
"color": "green",
|
||||
},
|
||||
),
|
||||
models.PointStruct(
|
||||
id=3,
|
||||
vector=[0.1, 0.1, 0.9],
|
||||
payload={
|
||||
"color": "blue",
|
||||
},
|
||||
),
|
||||
],
|
||||
update_mode=models.UpdateMode.INSERT_ONLY
|
||||
)
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
use qdrant_client::qdrant::{PointStruct, UpdateMode, UpsertPointsBuilder};
|
||||
|
||||
pub async fn main() -> anyhow::Result<()> {
|
||||
let client = qdrant_client::Qdrant::from_url("http://localhost:6334").build()?; // @hide
|
||||
|
||||
client
|
||||
.upsert_points(
|
||||
UpsertPointsBuilder::new(
|
||||
"{collection_name}",
|
||||
vec![
|
||||
PointStruct::new(1, vec![0.9, 0.1, 0.1], [("color", "red".into())]),
|
||||
PointStruct::new(2, vec![0.1, 0.9, 0.1], [("color", "green".into())]),
|
||||
PointStruct::new(3, vec![0.1, 0.1, 0.9], [("color", "blue".into())]),
|
||||
],
|
||||
)
|
||||
.update_mode(UpdateMode::InsertOnly),
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
import { QdrantClient } from "@qdrant/js-client-rest";
|
||||
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 });
|
||||
|
||||
client.upsert("{collection_name}", {
|
||||
points: [
|
||||
{
|
||||
id: 1,
|
||||
payload: { color: "red" },
|
||||
vector: [0.9, 0.1, 0.1],
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
payload: { color: "green" },
|
||||
vector: [0.1, 0.9, 0.1],
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
payload: { color: "blue" },
|
||||
vector: [0.1, 0.1, 0.9],
|
||||
},
|
||||
],
|
||||
update_mode: "insert_only",
|
||||
});
|
||||
Reference in New Issue
Block a user