mirror of
https://github.com/qdrant/landing_page.git
synced 2026-09-25 14:08:30 +02:00
Merge pull request #1865 from qdrant/disable-quantization-guide
Add snippets to disable quantization in guide
This commit is contained in:
@@ -252,6 +252,13 @@ In this case, the quantized vector will be 16 times smaller than the original ve
|
||||
`always_ram` - whether to keep quantized vectors always cached in RAM or not. By default, quantized vectors are loaded in the same way as the original vectors.
|
||||
However, in some setups you might want to keep quantized vectors in RAM to speed up the search process. Then set `always_ram` to `true`.
|
||||
|
||||
|
||||
### Disabling Quantization
|
||||
|
||||
To disable quantization in an existing collection, you can do the following:
|
||||
|
||||
{{< code-snippet path="/documentation/headless/snippets/update-collection/disable-quantization/" >}}
|
||||
|
||||
### Searching with Quantization
|
||||
|
||||
Once you have configured quantization for a collection, you don't need to do anything extra to search with quantization.
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
This code snippet demonstrates disabling quantization for a collection.
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
```bash
|
||||
curl -X PATCH http://localhost:6333/collections/{collection_name} \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"quantization_config": "Disabled"
|
||||
}'
|
||||
```
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
```csharp
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
var client = new QdrantClient("localhost", 6334);
|
||||
|
||||
await client.UpdateCollectionAsync(
|
||||
collectionName: "{collection_name}",
|
||||
quantizationConfig: new QuantizationConfigDiff { Disabled = new Disabled() }
|
||||
);
|
||||
```
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
```go
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
client.UpdateCollection(context.Background(), &qdrant.UpdateCollection{
|
||||
CollectionName: "{collection_name}",
|
||||
QuantizationConfig: qdrant.NewQuantizationDiffDisabled(),
|
||||
})
|
||||
```
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
```http
|
||||
PATCH /collections/{collection_name}
|
||||
{
|
||||
"quantization_config": "Disabled"
|
||||
}
|
||||
```
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
```java
|
||||
import io.qdrant.client.grpc.Collections.Disabled;
|
||||
import io.qdrant.client.grpc.Collections.QuantizationConfigDiff;
|
||||
import io.qdrant.client.grpc.Collections.UpdateCollection;
|
||||
|
||||
client.updateCollectionAsync(
|
||||
UpdateCollection.newBuilder()
|
||||
.setCollectionName("{collection_name}")
|
||||
.setQuantizationConfig(
|
||||
QuantizationConfigDiff.newBuilder()
|
||||
.setDisabled(Disabled.getDefaultInstance())
|
||||
.build())
|
||||
.build());
|
||||
```
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
```python
|
||||
client.update_collection(
|
||||
collection_name="{collection_name}",
|
||||
quantization_config=models.Disabled.DISABLED,
|
||||
)
|
||||
```
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
```rust
|
||||
use qdrant_client::qdrant::{Disabled, UpdateCollectionBuilder};
|
||||
|
||||
client
|
||||
.update_collection(UpdateCollectionBuilder::new("{collection_name}").quantization_config(Disabled {}))
|
||||
.await?;
|
||||
```
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
```typescript
|
||||
client.updateCollection("{collection_name}", {
|
||||
quantization_config: 'Disabled'
|
||||
});
|
||||
```
|
||||
Reference in New Issue
Block a user