mirror of
https://github.com/qdrant/landing_page.git
synced 2026-09-27 15:08:30 +02:00
docs: add missing requiests
This commit is contained in:
@@ -22,8 +22,28 @@ These settings can be changed at any time by a suitable request.
|
||||
|
||||
### Create collection
|
||||
|
||||
```json
|
||||
With REST API
|
||||
|
||||
```
|
||||
POST /collections
|
||||
|
||||
{
|
||||
"create_collection": {
|
||||
"name": "example_collection",
|
||||
"distance": "Cosine",
|
||||
"vector_size": 300
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
In addition to the required options, you can also specify custom values for the following collection options:
|
||||
|
||||
- `hnsw_config`
|
||||
- `wal_config`
|
||||
- `optimizers_config`
|
||||
|
||||
See [schema definitions](https://qdrant.github.io/qdrant/redoc/index.html#operation/update_collections) and [configuration file](https://github.com/qdrant/qdrant/blob/master/config/config.yaml) for more information about collection parameters.
|
||||
|
||||
|
||||
<!--
|
||||
#### Python
|
||||
@@ -34,7 +54,14 @@ These settings can be changed at any time by a suitable request.
|
||||
|
||||
### Delete collection
|
||||
|
||||
```json
|
||||
With REST API
|
||||
|
||||
```
|
||||
POST /collections
|
||||
|
||||
{
|
||||
"delete_collection": "example_collection"
|
||||
}
|
||||
```
|
||||
|
||||
<!--
|
||||
@@ -47,12 +74,25 @@ These settings can be changed at any time by a suitable request.
|
||||
|
||||
### Update collection parameters
|
||||
|
||||
Dynamic parameter update may be useful, for example, for more efficient initial loading of vectors.
|
||||
With these settings, you can disable indexing during the upload process and enable it immediately after it is finished.
|
||||
Dynamic parameter updates may be useful, for example, for more efficient initial loading of vectors.
|
||||
With these settings, you can disable indexing during the upload process. And enable it immediately after the upload is finished.
|
||||
As a result, you will not waste extra computation resources on rebuilding the index.
|
||||
|
||||
```json
|
||||
```
|
||||
POST /collections
|
||||
|
||||
{
|
||||
"update_collection": {
|
||||
"name": "example_collection",
|
||||
"optimizers_config": {
|
||||
"indexing_threshold": 10000
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This command enables indexing for segments that have more than 10000 vectors stored.
|
||||
|
||||
|
||||
<!--
|
||||
#### Python
|
||||
@@ -64,33 +104,34 @@ As a result, you will not waste extra computation resources on rebuilding the in
|
||||
|
||||
## Collection aliases
|
||||
|
||||
In production environment, it is sometimes necessary to switch different versions of vectors seamlessly.
|
||||
In a production environment, it is sometimes necessary to switch different versions of vectors seamlessly.
|
||||
For example, when upgrading to a new version of the neural network.
|
||||
|
||||
In these situations, there is no way to stop the service and rebuild the collection with new vectors.
|
||||
To avoid this, you can use aliases.
|
||||
Aliases are additional names for existing collections.
|
||||
All queries to the collection can also be done identically, using alias instead of the collection name.
|
||||
All queries to the collection can also be done identically, using an alias instead of the collection name.
|
||||
|
||||
Thus, it is possible to build a second collection in the background and then switch alias from the old to the new collection.
|
||||
Due to the fact that all changes of aliases happen atomically, no concurrent requests will be affected during the switch.
|
||||
Since all changes of aliases happen atomically, no concurrent requests will be affected during the switch.
|
||||
|
||||
### Crate alias
|
||||
|
||||
```json
|
||||
```
|
||||
POST /collections
|
||||
|
||||
<!--
|
||||
#### Python
|
||||
|
||||
```python
|
||||
```
|
||||
-->
|
||||
|
||||
|
||||
### Change alias
|
||||
|
||||
```json
|
||||
{
|
||||
"change_aliases": {
|
||||
"actions": [
|
||||
{
|
||||
"create_alias": {
|
||||
"alias_name": "production_collection",
|
||||
"collection_name": "example_collection"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!--
|
||||
@@ -103,7 +144,20 @@ Due to the fact that all changes of aliases happen atomically, no concurrent req
|
||||
|
||||
### Remove alias
|
||||
|
||||
```json
|
||||
```
|
||||
POST /collections
|
||||
|
||||
{
|
||||
"change_aliases": {
|
||||
"actions": [
|
||||
{
|
||||
"delete_alias": {
|
||||
"alias_name": "production_collection"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!--
|
||||
@@ -112,3 +166,31 @@ Due to the fact that all changes of aliases happen atomically, no concurrent req
|
||||
```python
|
||||
```
|
||||
-->
|
||||
|
||||
### Switch collection
|
||||
|
||||
Multiple alias actions are performed atomically.
|
||||
For example, you can switch underlying collection with the following command:
|
||||
|
||||
|
||||
```
|
||||
POST /collections
|
||||
|
||||
{
|
||||
"change_aliases": {
|
||||
"actions": [
|
||||
{
|
||||
"delete_alias": {
|
||||
"alias_name": "production_collection"
|
||||
}
|
||||
},
|
||||
{
|
||||
"create_alias": {
|
||||
"alias_name": "production_collection",
|
||||
"collection_name": "new_collection"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -289,20 +289,20 @@ REST API ([Schema](https://qdrant.github.io/qdrant/redoc/index.html#operation/sc
|
||||
POST /collections/{collection_name}/points/scroll
|
||||
|
||||
{
|
||||
"filter": {
|
||||
"must": [
|
||||
{
|
||||
"key": "color",
|
||||
"match": {
|
||||
"keyword": "red"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"limit": 1,
|
||||
"offset": 0,
|
||||
"with_payload": true,
|
||||
"with_vector": false
|
||||
"filter": {
|
||||
"must": [
|
||||
{
|
||||
"key": "color",
|
||||
"match": {
|
||||
"keyword": "red"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"limit": 1,
|
||||
"offset": 0,
|
||||
"with_payload": true,
|
||||
"with_vector": false
|
||||
}
|
||||
```
|
||||
|
||||
@@ -310,19 +310,19 @@ Returns all point with `color` = `red`.
|
||||
|
||||
```json
|
||||
{
|
||||
"result": {
|
||||
"next_page_offset": 1,
|
||||
"points": [
|
||||
{
|
||||
"id": 0,
|
||||
"payload": {
|
||||
"color": { "type": "keyword", "value": [ "red" ] },
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": "ok",
|
||||
"time": 0.0001
|
||||
"result": {
|
||||
"next_page_offset": 1,
|
||||
"points": [
|
||||
{
|
||||
"id": 0,
|
||||
"payload": {
|
||||
"color": { "type": "keyword", "value": [ "red" ] }
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": "ok",
|
||||
"time": 0.0001
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user