mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-08 20:38:31 +02:00
Fix type-checking errors in snippets (code only, no .md)
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.
This commit is contained in:
@@ -12,6 +12,8 @@ func Main() {
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
if err != nil { panic(err) } // @hide
|
||||
|
||||
client.UpdateVectors(context.Background(), &qdrant.UpdatePointVectors{
|
||||
CollectionName: "{collection_name}",
|
||||
Points: []*qdrant.PointVectors{
|
||||
|
||||
@@ -4,11 +4,17 @@ import static io.qdrant.client.PointIdFactory.id;
|
||||
import static io.qdrant.client.VectorFactory.vector;
|
||||
import static io.qdrant.client.VectorsFactory.namedVectors;
|
||||
|
||||
import io.qdrant.client.grpc.Points.PointVectors;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class Snippet {
|
||||
public static void run() throws Exception {
|
||||
// @hide-start
|
||||
io.qdrant.client.QdrantClient client =
|
||||
new io.qdrant.client.QdrantClient(io.qdrant.client.QdrantGrpcClient.newBuilder("localhost", 6334, false).build());
|
||||
// @hide-end
|
||||
|
||||
client
|
||||
.updateVectorsAsync(
|
||||
"{collection_name}",
|
||||
|
||||
@@ -5,6 +5,8 @@ use qdrant_client::qdrant::{
|
||||
};
|
||||
|
||||
pub async fn main() -> anyhow::Result<()> {
|
||||
let client = qdrant_client::Qdrant::from_url("http://localhost:6334").build()?; // @hide
|
||||
|
||||
client
|
||||
.update_vectors(
|
||||
UpdatePointVectorsBuilder::new(
|
||||
|
||||
Reference in New Issue
Block a user