mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-10 21:38:30 +02:00
* Document 7 missing strict_mode_config parameters Adds documentation sections and code snippets (Python, TypeScript, Rust, Go, Java, C#, HTTP, bash) for search_allow_exact, search_max_hnsw_ef, search_max_oversampling, search_max_batchsize, max_resident_memory_percent, multivector_config, and sparse_config. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Use title case for all headers * Update qdrant-landing/content/documentation/ops-configuration/administration.md Co-authored-by: Tim Visée <tim@visee.me> * Mention default strict mode on Cloud; Clarify behavior of only setting enabled=true * Apply suggestion from @timvisee Co-authored-by: Tim Visée <tim@visee.me> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Tim Visée <tim@visee.me>
31 lines
1.3 KiB
Java
31 lines
1.3 KiB
Java
package com.example.snippets_amalgamation;
|
|
|
|
import io.qdrant.client.QdrantClient;
|
|
import io.qdrant.client.QdrantGrpcClient;
|
|
import io.qdrant.client.grpc.Collections.CreateCollection;
|
|
import io.qdrant.client.grpc.Collections.StrictModeConfig;
|
|
import io.qdrant.client.grpc.Collections.StrictModeSparse;
|
|
import io.qdrant.client.grpc.Collections.StrictModeSparseConfig;
|
|
|
|
public class Snippet {
|
|
public static void run() throws Exception {
|
|
QdrantClient client =
|
|
new QdrantClient(QdrantGrpcClient.newBuilder("localhost", 6334, false).build());
|
|
|
|
client
|
|
.createCollectionAsync(
|
|
CreateCollection.newBuilder()
|
|
.setCollectionName("{collection_name}")
|
|
.setStrictModeConfig(
|
|
StrictModeConfig.newBuilder()
|
|
.setEnabled(true)
|
|
.setSparseConfig(
|
|
StrictModeSparseConfig.newBuilder()
|
|
.putSparseConfig("{vector_name}", StrictModeSparse.newBuilder().setMaxLength(1000).build())
|
|
.build())
|
|
.build())
|
|
.build())
|
|
.get();
|
|
}
|
|
}
|