mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-10 21:38:30 +02:00
Add Go/Java/C# snippets for named vector CRUD
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
public class Snippet
|
||||
{
|
||||
public static async Task Run()
|
||||
{
|
||||
// @hide-start
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
// @hide-end
|
||||
|
||||
await client.DeleteVectorNameAsync(new()
|
||||
{
|
||||
CollectionName = "{collection_name}",
|
||||
VectorName = "{vector_name}"
|
||||
});
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
```csharp
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
await client.DeleteVectorNameAsync(new()
|
||||
{
|
||||
CollectionName = "{collection_name}",
|
||||
VectorName = "{vector_name}"
|
||||
});
|
||||
```
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
```go
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
client.DeleteVectorName(context.Background(), &qdrant.DeleteVectorNameRequest{
|
||||
CollectionName: "{collection_name}",
|
||||
VectorName: "{vector_name}",
|
||||
})
|
||||
```
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
```java
|
||||
import io.qdrant.client.QdrantClient;
|
||||
import io.qdrant.client.QdrantGrpcClient;
|
||||
import io.qdrant.client.grpc.Points.DeleteVectorNameRequest;
|
||||
|
||||
client
|
||||
.deleteVectorNameAsync(
|
||||
DeleteVectorNameRequest.newBuilder()
|
||||
.setCollectionName("{collection_name}")
|
||||
.setVectorName("{vector_name}")
|
||||
.build())
|
||||
.get();
|
||||
```
|
||||
@@ -0,0 +1,23 @@
|
||||
package snippet
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
func Main() {
|
||||
// @hide-start
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
if err != nil { panic(err) }
|
||||
// @hide-end
|
||||
|
||||
client.DeleteVectorName(context.Background(), &qdrant.DeleteVectorNameRequest{
|
||||
CollectionName: "{collection_name}",
|
||||
VectorName: "{vector_name}",
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.example.snippets_amalgamation;
|
||||
|
||||
import io.qdrant.client.QdrantClient;
|
||||
import io.qdrant.client.QdrantGrpcClient;
|
||||
import io.qdrant.client.grpc.Points.DeleteVectorNameRequest;
|
||||
|
||||
public class Snippet {
|
||||
public static void run() throws Exception {
|
||||
// @hide-start
|
||||
QdrantClient client =
|
||||
new QdrantClient(QdrantGrpcClient.newBuilder("localhost", 6334, false).build());
|
||||
// @hide-end
|
||||
|
||||
client
|
||||
.deleteVectorNameAsync(
|
||||
DeleteVectorNameRequest.newBuilder()
|
||||
.setCollectionName("{collection_name}")
|
||||
.setVectorName("{vector_name}")
|
||||
.build())
|
||||
.get();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user