mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-05 19:08:32 +02:00
Shortcode for rendering code snippets from separate markdown files (#1548)
* shortcode for rendering code snippets from separate markdown files * formatted code * fix and readme * semi-automatically extracts snippets from markdown * extract snippets from points.md * extract snippets from vectors.md * extract snippets from payload.md * extract snippets from search.md + fixes * extract snippets from explore.md * extract snippets from hybrid-queries.md + mode query by id into search * extract snippets from filtering.md * extract snippets from storage.md + update outdated info * extract snippets from indexing.md * extract snippets from snapshots.md * extract snippets from guides/optimize.md * extract snippets from guides/multiple-partitions.md + fix aside note * extract snippets from guides/quantization.md * use auto-generated descriptions * order json snippets first --------- Co-authored-by: generall <andrey@vasnetsov.com>
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
Perform atomic alias actions to switch collections. In this scenario, there is a POST request made to manage aliases. The code snippet demonstrates a sequence of actions where an alias named "production_collection" is deleted, and then a new alias with the same name is created for the "example_collection". This allows for switching between collections efficiently.
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
```bash
|
||||
curl -X POST http://localhost:6333/collections/aliases \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"actions": [
|
||||
{
|
||||
"delete_alias": {
|
||||
"alias_name": "production_collection"
|
||||
}
|
||||
},
|
||||
{
|
||||
"create_alias": {
|
||||
"collection_name": "example_collection",
|
||||
"alias_name": "production_collection"
|
||||
}
|
||||
}
|
||||
]
|
||||
}'
|
||||
```
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
```csharp
|
||||
await client.DeleteAliasAsync("production_collection");
|
||||
await client.CreateAliasAsync(aliasName: "production_collection", collectionName: "example_collection");
|
||||
```
|
||||
@@ -0,0 +1,6 @@
|
||||
```go
|
||||
import "context"
|
||||
|
||||
client.DeleteAlias(context.Background(), "production_collection")
|
||||
client.CreateAlias(context.Background(), "production_collection", "example_collection")
|
||||
```
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
```http
|
||||
POST /collections/aliases
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"delete_alias": {
|
||||
"alias_name": "production_collection"
|
||||
}
|
||||
},
|
||||
{
|
||||
"create_alias": {
|
||||
"collection_name": "example_collection",
|
||||
"alias_name": "production_collection"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
```java
|
||||
client.deleteAliasAsync("production_collection").get();
|
||||
client.createAliasAsync("production_collection", "example_collection").get();
|
||||
```
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
```python
|
||||
client.update_collection_aliases(
|
||||
change_aliases_operations=[
|
||||
models.DeleteAliasOperation(
|
||||
delete_alias=models.DeleteAlias(alias_name="production_collection")
|
||||
),
|
||||
models.CreateAliasOperation(
|
||||
create_alias=models.CreateAlias(
|
||||
collection_name="example_collection", alias_name="production_collection"
|
||||
)
|
||||
),
|
||||
]
|
||||
)
|
||||
```
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
```rust
|
||||
use qdrant_client::qdrant::CreateAliasBuilder;
|
||||
|
||||
client.delete_alias("production_collection").await?;
|
||||
client
|
||||
.create_alias(CreateAliasBuilder::new(
|
||||
"example_collection",
|
||||
"production_collection",
|
||||
))
|
||||
.await?;
|
||||
```
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
```typescript
|
||||
client.updateCollectionAliases({
|
||||
actions: [
|
||||
{
|
||||
delete_alias: {
|
||||
alias_name: "production_collection",
|
||||
},
|
||||
},
|
||||
{
|
||||
create_alias: {
|
||||
collection_name: "example_collection",
|
||||
alias_name: "production_collection",
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
```
|
||||
Reference in New Issue
Block a user