mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-06 19:38:30 +02:00
Automated snippet conversion by scripts
These changes are purely mechanical to differentiate them from manual fixes/adjustments made in the next commit. This results in broken code as some snippets contain errors. Made in four steps: 1. Run ./migrate-snippet.py that converts `.md` files to code files and perhaps adds missing lines under `// @hide` comments. 2. Sort Java imports. 3. Remove old `.md` files. 4. Run ./generate.md to produce `*/generated/*.md` files.
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"strict_mode_config": {
|
||||
"enabled":" true,
|
||||
"condition_max_size": 10
|
||||
}
|
||||
}'
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
public class Snippet
|
||||
{
|
||||
public static async Task Run()
|
||||
{
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.CreateCollectionAsync(
|
||||
collectionName: "{collection_name}",
|
||||
strictModeConfig: new StrictModeConfig { enabled = true, condition_max_size = 10 }
|
||||
);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -7,4 +7,4 @@ curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
"condition_max_size": 10
|
||||
}
|
||||
}'
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -17,4 +17,4 @@ client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
ConditionMaxSize: qdrant.PtrOf(uint64(10)),
|
||||
},
|
||||
})
|
||||
```
|
||||
```
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
|
||||
```java
|
||||
import io.qdrant.client.QdrantClient;
|
||||
import io.qdrant.client.QdrantGrpcClient;
|
||||
@@ -16,4 +15,4 @@ client
|
||||
StrictModeConfig.newBuilder().setEnabled(true).setConditionMaxSize(10).build())
|
||||
.build())
|
||||
.get();
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -7,4 +7,4 @@ client.create_collection(
|
||||
collection_name="{collection_name}",
|
||||
strict_mode_config=models.StrictModeConfig(enabled=True, condition_max_size=10),
|
||||
)
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -10,4 +10,4 @@ client
|
||||
.strict_config_mode(StrictModeConfigBuilder::default().enabled(true).condition_max_size(10)),
|
||||
)
|
||||
.await?;
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -9,4 +9,4 @@ client.createCollection("{collection_name}", {
|
||||
condition_max_size: 10,
|
||||
},
|
||||
});
|
||||
```
|
||||
```
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package snippet
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
func Main() {
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
CollectionName: "{collection_name}",
|
||||
StrictModeConfig: &qdrant.StrictModeConfig{
|
||||
Enabled: qdrant.PtrOf(true),
|
||||
ConditionMaxSize: qdrant.PtrOf(uint64(10)),
|
||||
},
|
||||
})
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
|
||||
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).setConditionMaxSize(10).build())
|
||||
.build())
|
||||
.get();
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
from qdrant_client import QdrantClient, models
|
||||
|
||||
client = QdrantClient(url="http://localhost:6333")
|
||||
|
||||
client.create_collection(
|
||||
collection_name="{collection_name}",
|
||||
strict_mode_config=models.StrictModeConfig(enabled=True, condition_max_size=10),
|
||||
)
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
use qdrant_client::Qdrant;
|
||||
use qdrant_client::qdrant::{CreateCollectionBuilder, StrictModeConfigBuilder};
|
||||
|
||||
pub async fn main() -> anyhow::Result<()> {
|
||||
let client = Qdrant::from_url("http://localhost:6334").build()?;
|
||||
|
||||
client
|
||||
.create_collection(
|
||||
CreateCollectionBuilder::new("{collection_name}")
|
||||
.strict_config_mode(StrictModeConfigBuilder::default().enabled(true).condition_max_size(10)),
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import { QdrantClient } from "@qdrant/js-client-rest";
|
||||
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 });
|
||||
|
||||
client.createCollection("{collection_name}", {
|
||||
strict_mode_config: {
|
||||
enabled: true,
|
||||
condition_max_size: 10,
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"strict_mode_config": {
|
||||
"enabled":" false
|
||||
}
|
||||
}'
|
||||
@@ -0,0 +1,15 @@
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
public class Snippet
|
||||
{
|
||||
public static async Task Run()
|
||||
{
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.CreateCollectionAsync(
|
||||
collectionName: "{collection_name}",
|
||||
strictModeConfig: new StrictModeConfig { enabled = false }
|
||||
);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -6,4 +6,4 @@ curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
"enabled":" false
|
||||
}
|
||||
}'
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -16,4 +16,4 @@ client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
Enabled: qdrant.PtrOf(false),
|
||||
},
|
||||
})
|
||||
```
|
||||
```
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
|
||||
```java
|
||||
import io.qdrant.client.QdrantClient;
|
||||
import io.qdrant.client.QdrantGrpcClient;
|
||||
@@ -16,4 +15,4 @@ client
|
||||
StrictModeConfig.newBuilder().setEnabled(false).build())
|
||||
.build())
|
||||
.get();
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -7,4 +7,4 @@ client.create_collection(
|
||||
collection_name="{collection_name}",
|
||||
strict_mode_config=models.StrictModeConfig(enabled=False),
|
||||
)
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -10,4 +10,4 @@ client
|
||||
.strict_config_mode(StrictModeConfigBuilder::default().enabled(false)),
|
||||
)
|
||||
.await?;
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -8,4 +8,4 @@ client.createCollection("{collection_name}", {
|
||||
enabled: false,
|
||||
},
|
||||
});
|
||||
```
|
||||
```
|
||||
@@ -0,0 +1,21 @@
|
||||
package snippet
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
func Main() {
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
CollectionName: "{collection_name}",
|
||||
StrictModeConfig: &qdrant.StrictModeConfig{
|
||||
Enabled: qdrant.PtrOf(false),
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
|
||||
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(false).build())
|
||||
.build())
|
||||
.get();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
from qdrant_client import QdrantClient, models
|
||||
|
||||
client = QdrantClient(url="http://localhost:6333")
|
||||
|
||||
client.create_collection(
|
||||
collection_name="{collection_name}",
|
||||
strict_mode_config=models.StrictModeConfig(enabled=False),
|
||||
)
|
||||
@@ -0,0 +1,15 @@
|
||||
use qdrant_client::Qdrant;
|
||||
use qdrant_client::qdrant::{CreateCollectionBuilder, StrictModeConfigBuilder};
|
||||
|
||||
pub async fn main() -> anyhow::Result<()> {
|
||||
let client = Qdrant::from_url("http://localhost:6334").build()?;
|
||||
|
||||
client
|
||||
.create_collection(
|
||||
CreateCollectionBuilder::new("{collection_name}")
|
||||
.strict_config_mode(StrictModeConfigBuilder::default().enabled(false)),
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { QdrantClient } from "@qdrant/js-client-rest";
|
||||
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 });
|
||||
|
||||
client.createCollection("{collection_name}", {
|
||||
strict_mode_config: {
|
||||
enabled: false,
|
||||
},
|
||||
});
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"strict_mode_config": {
|
||||
"enabled":" true,
|
||||
"filter_max_conditions": 10
|
||||
}
|
||||
}'
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
public class Snippet
|
||||
{
|
||||
public static async Task Run()
|
||||
{
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.CreateCollectionAsync(
|
||||
collectionName: "{collection_name}",
|
||||
strictModeConfig: new StrictModeConfig { enabled = true, filter_max_conditions = 10 }
|
||||
);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -7,4 +7,4 @@ curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
"filter_max_conditions": 10
|
||||
}
|
||||
}'
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -17,4 +17,4 @@ client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
FilterMaxConditions: qdrant.PtrOf(uint64(10)),
|
||||
},
|
||||
})
|
||||
```
|
||||
```
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
|
||||
```java
|
||||
import io.qdrant.client.QdrantClient;
|
||||
import io.qdrant.client.QdrantGrpcClient;
|
||||
@@ -16,4 +15,4 @@ client
|
||||
StrictModeConfig.newBuilder().setEnabled(true).setFilterMaxConditions(10).build())
|
||||
.build())
|
||||
.get();
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -7,4 +7,4 @@ client.create_collection(
|
||||
collection_name="{collection_name}",
|
||||
strict_mode_config=models.StrictModeConfig(enabled=True, filter_max_conditions=10),
|
||||
)
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -10,4 +10,4 @@ client
|
||||
.strict_config_mode(StrictModeConfigBuilder::default().enabled(true).filter_max_conditions(10)),
|
||||
)
|
||||
.await?;
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -9,4 +9,4 @@ client.createCollection("{collection_name}", {
|
||||
filter_max_conditions: 10,
|
||||
},
|
||||
});
|
||||
```
|
||||
```
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package snippet
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
func Main() {
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
CollectionName: "{collection_name}",
|
||||
StrictModeConfig: &qdrant.StrictModeConfig{
|
||||
Enabled: qdrant.PtrOf(true),
|
||||
FilterMaxConditions: qdrant.PtrOf(uint64(10)),
|
||||
},
|
||||
})
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
|
||||
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).setFilterMaxConditions(10).build())
|
||||
.build())
|
||||
.get();
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
from qdrant_client import QdrantClient, models
|
||||
|
||||
client = QdrantClient(url="http://localhost:6333")
|
||||
|
||||
client.create_collection(
|
||||
collection_name="{collection_name}",
|
||||
strict_mode_config=models.StrictModeConfig(enabled=True, filter_max_conditions=10),
|
||||
)
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
use qdrant_client::Qdrant;
|
||||
use qdrant_client::qdrant::{CreateCollectionBuilder, StrictModeConfigBuilder};
|
||||
|
||||
pub async fn main() -> anyhow::Result<()> {
|
||||
let client = Qdrant::from_url("http://localhost:6334").build()?;
|
||||
|
||||
client
|
||||
.create_collection(
|
||||
CreateCollectionBuilder::new("{collection_name}")
|
||||
.strict_config_mode(StrictModeConfigBuilder::default().enabled(true).filter_max_conditions(10)),
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import { QdrantClient } from "@qdrant/js-client-rest";
|
||||
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 });
|
||||
|
||||
client.createCollection("{collection_name}", {
|
||||
strict_mode_config: {
|
||||
enabled: true,
|
||||
filter_max_conditions: 10,
|
||||
},
|
||||
});
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"strict_mode_config": {
|
||||
"enabled":" true,
|
||||
"max_collection_vector_size_bytes": 100000,
|
||||
"max_collection_payload_size_bytes": 100000
|
||||
}
|
||||
}'
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
public class Snippet
|
||||
{
|
||||
public static async Task Run()
|
||||
{
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.CreateCollectionAsync(
|
||||
collectionName: "{collection_name}",
|
||||
strictModeConfig: new StrictModeConfig { enabled = true, max_collection_vector_size_bytes = 1000000, max_collection_payload_size_bytes = 1000000 }
|
||||
);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -8,4 +8,4 @@ curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
"max_collection_payload_size_bytes": 100000
|
||||
}
|
||||
}'
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -18,4 +18,4 @@ client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
MaxCollectionPayloadSizeBytes: qdrant.PtrOf(uint64(1000000)),
|
||||
},
|
||||
})
|
||||
```
|
||||
```
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
|
||||
```java
|
||||
import io.qdrant.client.QdrantClient;
|
||||
import io.qdrant.client.QdrantGrpcClient;
|
||||
@@ -16,4 +15,4 @@ client
|
||||
StrictModeConfig.newBuilder().setEnabled(true).setMaxCollectionVectorSizeBytes(1000000).setMaxCollectionPayloadSizeBytes(1000000).build())
|
||||
.build())
|
||||
.get();
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -7,4 +7,4 @@ client.create_collection(
|
||||
collection_name="{collection_name}",
|
||||
strict_mode_config=models.StrictModeConfig(enabled=True, max_collection_vector_size_bytes=1000000, max_collection_payload_size_bytes=1000000),
|
||||
)
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -10,4 +10,4 @@ client
|
||||
.strict_config_mode(StrictModeConfigBuilder::default().enabled(true).max_collection_vector_size_bytes(1000000).max_collection_payload_size_bytes(1000000)),
|
||||
)
|
||||
.await?;
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -10,4 +10,4 @@ client.createCollection("{collection_name}", {
|
||||
max_collection_payload_size_bytes: 1000000,
|
||||
},
|
||||
});
|
||||
```
|
||||
```
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package snippet
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
func Main() {
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
CollectionName: "{collection_name}",
|
||||
StrictModeConfig: &qdrant.StrictModeConfig{
|
||||
Enabled: qdrant.PtrOf(true),
|
||||
MaxCollectionVectorSizeBytes: qdrant.PtrOf(uint64(1000000)),
|
||||
MaxCollectionPayloadSizeBytes: qdrant.PtrOf(uint64(1000000)),
|
||||
},
|
||||
})
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
|
||||
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).setMaxCollectionVectorSizeBytes(1000000).setMaxCollectionPayloadSizeBytes(1000000).build())
|
||||
.build())
|
||||
.get();
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
from qdrant_client import QdrantClient, models
|
||||
|
||||
client = QdrantClient(url="http://localhost:6333")
|
||||
|
||||
client.create_collection(
|
||||
collection_name="{collection_name}",
|
||||
strict_mode_config=models.StrictModeConfig(enabled=True, max_collection_vector_size_bytes=1000000, max_collection_payload_size_bytes=1000000),
|
||||
)
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
use qdrant_client::Qdrant;
|
||||
use qdrant_client::qdrant::{CreateCollectionBuilder, StrictModeConfigBuilder};
|
||||
|
||||
pub async fn main() -> anyhow::Result<()> {
|
||||
let client = Qdrant::from_url("http://localhost:6334").build()?;
|
||||
|
||||
client
|
||||
.create_collection(
|
||||
CreateCollectionBuilder::new("{collection_name}")
|
||||
.strict_config_mode(StrictModeConfigBuilder::default().enabled(true).max_collection_vector_size_bytes(1000000).max_collection_payload_size_bytes(1000000)),
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import { QdrantClient } from "@qdrant/js-client-rest";
|
||||
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 });
|
||||
|
||||
client.createCollection("{collection_name}", {
|
||||
strict_mode_config: {
|
||||
enabled: true,
|
||||
max_collection_vector_size_bytes: 1000000,
|
||||
max_collection_payload_size_bytes: 1000000,
|
||||
},
|
||||
});
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"strict_mode_config": {
|
||||
"enabled":" true,
|
||||
"max_payload_index_count": 10
|
||||
}
|
||||
}'
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
public class Snippet
|
||||
{
|
||||
public static async Task Run()
|
||||
{
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.CreateCollectionAsync(
|
||||
collectionName: "{collection_name}",
|
||||
strictModeConfig: new StrictModeConfig { enabled = true, max_payload_index_count = 10 }
|
||||
);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -7,4 +7,4 @@ curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
"max_payload_index_count": 10
|
||||
}
|
||||
}'
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -17,4 +17,4 @@ client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
MaxPayloadIndexCount: qdrant.PtrOf(uint64(10)),
|
||||
},
|
||||
})
|
||||
```
|
||||
```
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
|
||||
```java
|
||||
import io.qdrant.client.QdrantClient;
|
||||
import io.qdrant.client.QdrantGrpcClient;
|
||||
@@ -16,4 +15,4 @@ client
|
||||
StrictModeConfig.newBuilder().setEnabled(true).setMaxPayloadIndexCount(10).build())
|
||||
.build())
|
||||
.get();
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -7,4 +7,4 @@ client.create_collection(
|
||||
collection_name="{collection_name}",
|
||||
strict_mode_config=models.StrictModeConfig(enabled=True, max_payload_index_count=10),
|
||||
)
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -10,4 +10,4 @@ client
|
||||
.strict_config_mode(StrictModeConfigBuilder::default().enabled(true).max_payload_index_count(10)),
|
||||
)
|
||||
.await?;
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -9,4 +9,4 @@ client.createCollection("{collection_name}", {
|
||||
max_payload_index_count: 10,
|
||||
},
|
||||
});
|
||||
```
|
||||
```
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package snippet
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
func Main() {
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
CollectionName: "{collection_name}",
|
||||
StrictModeConfig: &qdrant.StrictModeConfig{
|
||||
Enabled: qdrant.PtrOf(true),
|
||||
MaxPayloadIndexCount: qdrant.PtrOf(uint64(10)),
|
||||
},
|
||||
})
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
|
||||
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).setMaxPayloadIndexCount(10).build())
|
||||
.build())
|
||||
.get();
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
from qdrant_client import QdrantClient, models
|
||||
|
||||
client = QdrantClient(url="http://localhost:6333")
|
||||
|
||||
client.create_collection(
|
||||
collection_name="{collection_name}",
|
||||
strict_mode_config=models.StrictModeConfig(enabled=True, max_payload_index_count=10),
|
||||
)
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
use qdrant_client::Qdrant;
|
||||
use qdrant_client::qdrant::{CreateCollectionBuilder, StrictModeConfigBuilder};
|
||||
|
||||
pub async fn main() -> anyhow::Result<()> {
|
||||
let client = Qdrant::from_url("http://localhost:6334").build()?;
|
||||
|
||||
client
|
||||
.create_collection(
|
||||
CreateCollectionBuilder::new("{collection_name}")
|
||||
.strict_config_mode(StrictModeConfigBuilder::default().enabled(true).max_payload_index_count(10)),
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import { QdrantClient } from "@qdrant/js-client-rest";
|
||||
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 });
|
||||
|
||||
client.createCollection("{collection_name}", {
|
||||
strict_mode_config: {
|
||||
enabled: true,
|
||||
max_payload_index_count: 10,
|
||||
},
|
||||
});
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"strict_mode_config": {
|
||||
"enabled":" true,
|
||||
"max_points_count": 1000
|
||||
}
|
||||
}'
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
public class Snippet
|
||||
{
|
||||
public static async Task Run()
|
||||
{
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.CreateCollectionAsync(
|
||||
collectionName: "{collection_name}",
|
||||
strictModeConfig: new StrictModeConfig { enabled = true, max_points_count = 1000 }
|
||||
);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -7,4 +7,4 @@ curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
"max_points_count": 1000
|
||||
}
|
||||
}'
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -17,4 +17,4 @@ client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
MaxPointsCount: qdrant.PtrOf(uint64(1000)),
|
||||
},
|
||||
})
|
||||
```
|
||||
```
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
|
||||
```java
|
||||
import io.qdrant.client.QdrantClient;
|
||||
import io.qdrant.client.QdrantGrpcClient;
|
||||
@@ -16,4 +15,4 @@ client
|
||||
StrictModeConfig.newBuilder().setEnabled(true).setMaxPointsCount(1000).build())
|
||||
.build())
|
||||
.get();
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -7,4 +7,4 @@ client.create_collection(
|
||||
collection_name="{collection_name}",
|
||||
strict_mode_config=models.StrictModeConfig(enabled=True, max_points_count=1000),
|
||||
)
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -10,4 +10,4 @@ client
|
||||
.strict_config_mode(StrictModeConfigBuilder::default().enabled(true).max_points_count(1000)),
|
||||
)
|
||||
.await?;
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -9,4 +9,4 @@ client.createCollection("{collection_name}", {
|
||||
max_points_count: 1000,
|
||||
},
|
||||
});
|
||||
```
|
||||
```
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package snippet
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
func Main() {
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
CollectionName: "{collection_name}",
|
||||
StrictModeConfig: &qdrant.StrictModeConfig{
|
||||
Enabled: qdrant.PtrOf(true),
|
||||
MaxPointsCount: qdrant.PtrOf(uint64(1000)),
|
||||
},
|
||||
})
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
|
||||
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).setMaxPointsCount(1000).build())
|
||||
.build())
|
||||
.get();
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
from qdrant_client import QdrantClient, models
|
||||
|
||||
client = QdrantClient(url="http://localhost:6333")
|
||||
|
||||
client.create_collection(
|
||||
collection_name="{collection_name}",
|
||||
strict_mode_config=models.StrictModeConfig(enabled=True, max_points_count=1000),
|
||||
)
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
use qdrant_client::Qdrant;
|
||||
use qdrant_client::qdrant::{CreateCollectionBuilder, StrictModeConfigBuilder};
|
||||
|
||||
pub async fn main() -> anyhow::Result<()> {
|
||||
let client = Qdrant::from_url("http://localhost:6334").build()?;
|
||||
|
||||
client
|
||||
.create_collection(
|
||||
CreateCollectionBuilder::new("{collection_name}")
|
||||
.strict_config_mode(StrictModeConfigBuilder::default().enabled(true).max_points_count(1000)),
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import { QdrantClient } from "@qdrant/js-client-rest";
|
||||
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 });
|
||||
|
||||
client.createCollection("{collection_name}", {
|
||||
strict_mode_config: {
|
||||
enabled: true,
|
||||
max_points_count: 1000,
|
||||
},
|
||||
});
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"strict_mode_config": {
|
||||
"enabled":" true,
|
||||
"max_query_limit": 10
|
||||
}
|
||||
}'
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
public class Snippet
|
||||
{
|
||||
public static async Task Run()
|
||||
{
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.CreateCollectionAsync(
|
||||
collectionName: "{collection_name}",
|
||||
strictModeConfig: new StrictModeConfig { enabled = true, max_query_limit = 10 }
|
||||
);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -7,4 +7,4 @@ curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
"max_query_limit": 10
|
||||
}
|
||||
}'
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -17,4 +17,4 @@ client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
MaxQueryLimit: qdrant.PtrOf(uint64(10)),
|
||||
},
|
||||
})
|
||||
```
|
||||
```
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
|
||||
```java
|
||||
import io.qdrant.client.QdrantClient;
|
||||
import io.qdrant.client.QdrantGrpcClient;
|
||||
@@ -16,4 +15,4 @@ client
|
||||
StrictModeConfig.newBuilder().setEnabled(true).setMaxQueryLimit(10).build())
|
||||
.build())
|
||||
.get();
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -7,4 +7,4 @@ client.create_collection(
|
||||
collection_name="{collection_name}",
|
||||
strict_mode_config=models.StrictModeConfig(enabled=True, max_query_limit=10),
|
||||
)
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -10,4 +10,4 @@ client
|
||||
.strict_config_mode(StrictModeConfigBuilder::default().enabled(true).max_query_limit(10)),
|
||||
)
|
||||
.await?;
|
||||
```
|
||||
```
|
||||
+1
-1
@@ -9,4 +9,4 @@ client.createCollection("{collection_name}", {
|
||||
max_query_limit: 10,
|
||||
},
|
||||
});
|
||||
```
|
||||
```
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package snippet
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
func Main() {
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
CollectionName: "{collection_name}",
|
||||
StrictModeConfig: &qdrant.StrictModeConfig{
|
||||
Enabled: qdrant.PtrOf(true),
|
||||
MaxQueryLimit: qdrant.PtrOf(uint64(10)),
|
||||
},
|
||||
})
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
|
||||
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).setMaxQueryLimit(10).build())
|
||||
.build())
|
||||
.get();
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
from qdrant_client import QdrantClient, models
|
||||
|
||||
client = QdrantClient(url="http://localhost:6333")
|
||||
|
||||
client.create_collection(
|
||||
collection_name="{collection_name}",
|
||||
strict_mode_config=models.StrictModeConfig(enabled=True, max_query_limit=10),
|
||||
)
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
use qdrant_client::Qdrant;
|
||||
use qdrant_client::qdrant::{CreateCollectionBuilder, StrictModeConfigBuilder};
|
||||
|
||||
pub async fn main() -> anyhow::Result<()> {
|
||||
let client = Qdrant::from_url("http://localhost:6334").build()?;
|
||||
|
||||
client
|
||||
.create_collection(
|
||||
CreateCollectionBuilder::new("{collection_name}")
|
||||
.strict_config_mode(StrictModeConfigBuilder::default().enabled(true).max_query_limit(10)),
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import { QdrantClient } from "@qdrant/js-client-rest";
|
||||
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 });
|
||||
|
||||
client.createCollection("{collection_name}", {
|
||||
strict_mode_config: {
|
||||
enabled: true,
|
||||
max_query_limit: 10,
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"strict_mode_config": {
|
||||
"enabled":" true,
|
||||
"max_timeout": 10
|
||||
}
|
||||
}'
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
public class Snippet
|
||||
{
|
||||
public static async Task Run()
|
||||
{
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.CreateCollectionAsync(
|
||||
collectionName: "{collection_name}",
|
||||
strictModeConfig: new StrictModeConfig { enabled = true, max_timeout = 10 }
|
||||
);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user