mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-03 01:48:32 +02:00
23 lines
913 B
Java
23 lines
913 B
Java
package com.example.snippets_amalgamation;
|
|
|
|
import io.qdrant.client.grpc.Collections.OptimizersConfigDiff;
|
|
import io.qdrant.client.grpc.Collections.UpdateCollection;
|
|
|
|
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
|
|
.updateCollectionAsync(
|
|
UpdateCollection.newBuilder()
|
|
.setCollectionName("{collection_name}")
|
|
.setOptimizersConfig(
|
|
OptimizersConfigDiff.newBuilder().setPreventUnoptimized(true).build())
|
|
.build())
|
|
.get();
|
|
}
|
|
}
|