mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-06 11:28:31 +02:00
Fix unindexed filtering retrieve docs (#2217)
* Change 2nd snippet to use update collection instead of create * Fix broken link
This commit is contained in:
+2
-2
@@ -1,8 +1,8 @@
|
||||
curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
curl -X PATCH http://localhost:6333/collections/{collection_name} \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"strict_mode_config": {
|
||||
"enabled":" true,
|
||||
"enabled": true,
|
||||
"unindexed_filtering_retrieve": true
|
||||
}
|
||||
}'
|
||||
|
||||
+6
-2
@@ -7,9 +7,13 @@ public class Snippet
|
||||
{
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.CreateCollectionAsync(
|
||||
await client.UpdateCollectionAsync(
|
||||
collectionName: "{collection_name}",
|
||||
strictModeConfig: new StrictModeConfig { Enabled = true, UnindexedFilteringRetrieve = true }
|
||||
strictModeConfig: new StrictModeConfig
|
||||
{
|
||||
Enabled = true,
|
||||
UnindexedFilteringRetrieve = true,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
```bash
|
||||
curl -X PUT http://localhost:6333/collections/{collection_name} \
|
||||
curl -X PATCH http://localhost:6333/collections/{collection_name} \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"strict_mode_config": {
|
||||
"enabled":" true,
|
||||
"enabled": true,
|
||||
"unindexed_filtering_retrieve": true
|
||||
}
|
||||
}'
|
||||
|
||||
+6
-2
@@ -4,8 +4,12 @@ using Qdrant.Client.Grpc;
|
||||
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.CreateCollectionAsync(
|
||||
await client.UpdateCollectionAsync(
|
||||
collectionName: "{collection_name}",
|
||||
strictModeConfig: new StrictModeConfig { Enabled = true, UnindexedFilteringRetrieve = true }
|
||||
strictModeConfig: new StrictModeConfig
|
||||
{
|
||||
Enabled = true,
|
||||
UnindexedFilteringRetrieve = true,
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
+1
-6
@@ -5,12 +5,7 @@ import (
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
client.UpdateCollection(context.Background(), &qdrant.UpdateCollection{
|
||||
CollectionName: "{collection_name}",
|
||||
StrictModeConfig: &qdrant.StrictModeConfig{
|
||||
Enabled: qdrant.PtrOf(true),
|
||||
|
||||
+7
-7
@@ -1,18 +1,18 @@
|
||||
```java
|
||||
import io.qdrant.client.QdrantClient;
|
||||
import io.qdrant.client.QdrantGrpcClient;
|
||||
import io.qdrant.client.grpc.Collections.CreateCollection;
|
||||
import io.qdrant.client.grpc.Collections.UpdateCollection;
|
||||
import io.qdrant.client.grpc.Collections.StrictModeConfig;
|
||||
|
||||
QdrantClient client =
|
||||
new QdrantClient(QdrantGrpcClient.newBuilder("localhost", 6334, false).build());
|
||||
|
||||
client
|
||||
.createCollectionAsync(
|
||||
CreateCollection.newBuilder()
|
||||
.updateCollectionAsync(
|
||||
UpdateCollection.newBuilder()
|
||||
.setCollectionName("{collection_name}")
|
||||
.setStrictModeConfig(
|
||||
StrictModeConfig.newBuilder().setEnabled(true).setUnindexedFilteringRetrieve(true).build())
|
||||
StrictModeConfig.newBuilder()
|
||||
.setEnabled(true)
|
||||
.setUnindexedFilteringRetrieve(true)
|
||||
.build())
|
||||
.build())
|
||||
.get();
|
||||
```
|
||||
|
||||
+5
-6
@@ -1,10 +1,9 @@
|
||||
```python
|
||||
from qdrant_client import QdrantClient, models
|
||||
|
||||
client = QdrantClient(url="http://localhost:6333")
|
||||
|
||||
client.create_collection(
|
||||
client.update_collection(
|
||||
collection_name="{collection_name}",
|
||||
strict_mode_config=models.StrictModeConfig(enabled=True, unindexed_filtering_retrieve=True),
|
||||
strict_mode_config=models.StrictModeConfig(
|
||||
enabled=True,
|
||||
unindexed_filtering_retrieve=True,
|
||||
),
|
||||
)
|
||||
```
|
||||
|
||||
+8
-7
@@ -1,13 +1,14 @@
|
||||
```rust
|
||||
use qdrant_client::Qdrant;
|
||||
use qdrant_client::qdrant::{CreateCollectionBuilder, StrictModeConfigBuilder};
|
||||
|
||||
let client = Qdrant::from_url("http://localhost:6334").build()?;
|
||||
use qdrant_client::qdrant::{UpdateCollectionBuilder, StrictModeConfigBuilder};
|
||||
|
||||
client
|
||||
.create_collection(
|
||||
CreateCollectionBuilder::new("{collection_name}")
|
||||
.strict_mode_config(StrictModeConfigBuilder::default().enabled(true).unindexed_filtering_retrieve(true)),
|
||||
.update_collection(
|
||||
UpdateCollectionBuilder::new("{collection_name}")
|
||||
.strict_mode_config(
|
||||
StrictModeConfigBuilder::default()
|
||||
.enabled(true)
|
||||
.unindexed_filtering_retrieve(true),
|
||||
),
|
||||
)
|
||||
.await?;
|
||||
```
|
||||
|
||||
+1
-5
@@ -1,9 +1,5 @@
|
||||
```typescript
|
||||
import { QdrantClient } from "@qdrant/js-client-rest";
|
||||
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 });
|
||||
|
||||
client.createCollection("{collection_name}", {
|
||||
client.updateCollection("{collection_name}", {
|
||||
strict_mode_config: {
|
||||
enabled: true,
|
||||
unindexed_filtering_retrieve: true,
|
||||
|
||||
+4
-2
@@ -7,14 +7,16 @@ import (
|
||||
)
|
||||
|
||||
func Main() {
|
||||
// @hide-start
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
if err != nil { panic(err) } // @hide
|
||||
if err != nil { panic(err) }
|
||||
// @hide-end
|
||||
|
||||
client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
client.UpdateCollection(context.Background(), &qdrant.UpdateCollection{
|
||||
CollectionName: "{collection_name}",
|
||||
StrictModeConfig: &qdrant.StrictModeConfig{
|
||||
Enabled: qdrant.PtrOf(true),
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
```http
|
||||
PUT /collections/{collection_name}
|
||||
PATCH /collections/{collection_name}
|
||||
{
|
||||
"strict_mode_config": {
|
||||
"enabled": true,
|
||||
|
||||
+13
-6
@@ -2,20 +2,27 @@ 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.UpdateCollection;
|
||||
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());
|
||||
// @hide-start
|
||||
QdrantClient client = new QdrantClient(
|
||||
QdrantGrpcClient
|
||||
.newBuilder("localhost", 6334, false)
|
||||
.build());
|
||||
// @hide-end
|
||||
|
||||
client
|
||||
.createCollectionAsync(
|
||||
CreateCollection.newBuilder()
|
||||
.updateCollectionAsync(
|
||||
UpdateCollection.newBuilder()
|
||||
.setCollectionName("{collection_name}")
|
||||
.setStrictModeConfig(
|
||||
StrictModeConfig.newBuilder().setEnabled(true).setUnindexedFilteringRetrieve(true).build())
|
||||
StrictModeConfig.newBuilder()
|
||||
.setEnabled(true)
|
||||
.setUnindexedFilteringRetrieve(true)
|
||||
.build())
|
||||
.build())
|
||||
.get();
|
||||
}
|
||||
|
||||
+7
-4
@@ -1,8 +1,11 @@
|
||||
from qdrant_client import QdrantClient, models
|
||||
from qdrant_client import QdrantClient, models # @hide
|
||||
|
||||
client = QdrantClient(url="http://localhost:6333")
|
||||
client = QdrantClient(url="http://localhost:6333") # @hide
|
||||
|
||||
client.create_collection(
|
||||
client.update_collection(
|
||||
collection_name="{collection_name}",
|
||||
strict_mode_config=models.StrictModeConfig(enabled=True, unindexed_filtering_retrieve=True),
|
||||
strict_mode_config=models.StrictModeConfig(
|
||||
enabled=True,
|
||||
unindexed_filtering_retrieve=True,
|
||||
),
|
||||
)
|
||||
|
||||
+9
-6
@@ -1,13 +1,16 @@
|
||||
use qdrant_client::Qdrant;
|
||||
use qdrant_client::qdrant::{CreateCollectionBuilder, StrictModeConfigBuilder};
|
||||
use qdrant_client::qdrant::{UpdateCollectionBuilder, StrictModeConfigBuilder};
|
||||
|
||||
pub async fn main() -> anyhow::Result<()> {
|
||||
let client = Qdrant::from_url("http://localhost:6334").build()?;
|
||||
let client = qdrant_client::Qdrant::from_url("http://localhost:6334").build()?; // @hide
|
||||
|
||||
client
|
||||
.create_collection(
|
||||
CreateCollectionBuilder::new("{collection_name}")
|
||||
.strict_mode_config(StrictModeConfigBuilder::default().enabled(true).unindexed_filtering_retrieve(true)),
|
||||
.update_collection(
|
||||
UpdateCollectionBuilder::new("{collection_name}")
|
||||
.strict_mode_config(
|
||||
StrictModeConfigBuilder::default()
|
||||
.enabled(true)
|
||||
.unindexed_filtering_retrieve(true),
|
||||
),
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
import { QdrantClient } from "@qdrant/js-client-rest";
|
||||
import { QdrantClient } from "@qdrant/js-client-rest"; // @hide
|
||||
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 });
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 }); // @hide
|
||||
|
||||
client.createCollection("{collection_name}", {
|
||||
client.updateCollection("{collection_name}", {
|
||||
strict_mode_config: {
|
||||
enabled: true,
|
||||
unindexed_filtering_retrieve: true,
|
||||
|
||||
@@ -60,7 +60,7 @@ Setting `unindexed_filtering_retrieve` to false prevents retrieving points by fi
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/strict-mode/unindexed-filtering-retrieve/" >}}
|
||||
|
||||
Or turn it off later on an existing collection through the [collection update](#update-collection-parameters) API.
|
||||
Or turn it off later on an existing collection through the [update collection parameters](/documentation/manage-data/collections/#update-collection-parameters) API.
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/strict-mode/unindexed-filtering-retrieve-off/" >}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user