diff --git a/qdrant-landing/config.toml b/qdrant-landing/config.toml index 1bccd88dc..87149195b 100644 --- a/qdrant-landing/config.toml +++ b/qdrant-landing/config.toml @@ -45,9 +45,9 @@ keywords = "search engine, neural network, matching, filter, SaaS, approximate n gdpr = "We use cookies to learn more about you. At any time you can delete or block cookies through your browser settings." - githubDocPrefix = "https://github.com/qdrant/docs/tree/master/qdrant/v0.3.x/" + githubDocPrefix = "https://github.com/qdrant/docs/tree/master/qdrant/v0.5.x/" - docVersion = "v0.3.x" + docVersion = "v0.5.x" [menu] diff --git a/qdrant-landing/content/documentation/collections.md b/qdrant-landing/content/documentation/collections.md index d3b6d488b..4aed4f009 100644 --- a/qdrant-landing/content/documentation/collections.md +++ b/qdrant-landing/content/documentation/collections.md @@ -25,14 +25,12 @@ These settings can be changed at any time by a corresponding request. With REST API ``` -POST /collections +PUT /collections/example_collection { - "create_collection": { - "name": "example_collection", - "distance": "Cosine", - "vector_size": 300 - } + "name": "example_collection", + "distance": "Cosine", + "vector_size": 300 } ``` @@ -42,7 +40,7 @@ In addition to the required options, you can also specify custom values for the - `wal_config` - `optimizers_config` -See [schema definitions](https://qdrant.github.io/qdrant/redoc/index.html#operation/update_collections) and a [configuration file](https://github.com/qdrant/qdrant/blob/master/config/config.yaml) for more information about collection parameters. +See [schema definitions](https://qdrant.github.io/qdrant/redoc/index.html#operation/create_collection) and a [configuration file](https://github.com/qdrant/qdrant/blob/master/config/config.yaml) for more information about collection parameters. + +and + +``` +PUT /collections/{collection_name}/points + +{ + "points": [ + { + "id": 1, + "payload": {"color": "red"}, + "vector": [0.9, 0.1, 0.1] + } + ] +} +``` + + + +both are possible. ## Upload points @@ -58,23 +120,21 @@ Internally, these options do not differ and are made only for the convenience of Create points with REST API : ``` -POST /collections/{collection_name} +PUT /collections/{collection_name}/points { - "upsert_points": { - "batch": { - "ids": [1, 2, 3], - "payloads": [ - {"color": "red"}, - {"color": "green"}, - {"color": "blue"} - ], - "vectors": [ - [0.9, 0.1, 0.1], - [0.1, 0.9, 0.1], - [0.1, 0.1, 0.9], - ] - } + "batch": { + "ids": [1, 2, 3], + "payloads": [ + {"color": "red"}, + {"color": "green"}, + {"color": "blue"} + ], + "vectors": [ + [0.9, 0.1, 0.1], + [0.1, 0.9, 0.1], + [0.1, 0.1, 0.9], + ] } } ``` @@ -82,28 +142,26 @@ POST /collections/{collection_name} or record-oriented equivalent: ``` -POST /collections/{collection_name} +PUT /collections/{collection_name}/points { - "upsert_points": { - "points": [ - { - "id": 1, - "payload": {"color": "red"}, - "vector": [0.9, 0.1, 0.1] - }, - { - "id": 2, - "payload": {"color": "green"}, - "vector": [0.1, 0.9, 0.1] - }, - { - "id": 3, - "payload": {"color": "blue"}, - "vector": [0.1, 0.1, 0.9] - }, - ] - } + "points": [ + { + "id": 1, + "payload": {"color": "red"}, + "vector": [0.9, 0.1, 0.1] + }, + { + "id": 2, + "payload": {"color": "green"}, + "vector": [0.1, 0.9, 0.1] + }, + { + "id": 3, + "payload": {"color": "blue"}, + "vector": [0.1, 0.1, 0.9] + }, + ] } ``` @@ -135,21 +193,19 @@ The second is to modify the payload, for which there are several methods. #### Set payload -REST API ([Schema](https://qdrant.github.io/qdrant/redoc/index.html#operation/update_points)): +REST API ([Schema](https://qdrant.github.io/qdrant/redoc/index.html#operation/set_payload)): ``` -POST /collections/{collection_name} +POST /collections/{collection_name}/points/payload { - "set_payload": { - "payload": { - "property1": "string", - "property2": "string" - }, - "points": [ - 0, 3, 100 - ] - } + "payload": { + "property1": "string", + "property2": "string" + }, + "points": [ + 0, 3, 100 + ] } ``` @@ -164,16 +220,14 @@ Python client: #### Delete payload keys -REST API ([Schema](https://qdrant.github.io/qdrant/redoc/index.html#operation/update_points)): +REST API ([Schema](https://qdrant.github.io/qdrant/redoc/index.html#operation/delete_payload)): ``` -POST /collections/{collection_name} +POST /collections/{collection_name}/points/payload/delete { - "delete_payload": { - "keys": ["color", "price"], - "points": [0, 3, 100] - } + "keys": ["color", "price"], + "points": [0, 3, 100] } ``` @@ -190,15 +244,13 @@ Python client: This method removes all payload keys from specified points -REST API ([Schema](https://qdrant.github.io/qdrant/redoc/index.html#operation/update_points)): +REST API ([Schema](https://qdrant.github.io/qdrant/redoc/index.html#operation/clear_payload)): ``` -POST /collections/{collection_name} +POST /collections/{collection_name}/points/payload/clear { - "clear_payload": { - "points": [0, 3, 100] - } + "points": [0, 3, 100] } ``` @@ -214,15 +266,13 @@ POST /collections/{collection_name} ## Delete points -REST API ([Schema](https://qdrant.github.io/qdrant/redoc/index.html#operation/update_points)): +REST API ([Schema](https://qdrant.github.io/qdrant/redoc/index.html#operation/delete_points)): ``` -POST /collections/{collection_name} +POST /collections/{collection_name}/points/delete { - "delete_points": { - "ids": [0, 3, 100] - } + "points": [0, 3, 100] } ``` @@ -235,6 +285,28 @@ POST /collections/{collection_name} --> +Alternative way to specify which points to remove is to use filter. + +``` +POST /collections/{collection_name}/points/delete + +{ + "filter": { + "must": [ + { + "key": "color" + "match": { + "keyword": "red" + } + } + ] + } +} +``` + +This example removes all points with `{ "color": "red" }` from the collection. + + ## Retrieve points There is a method for retrieving points by their ids. @@ -258,7 +330,7 @@ POST /collections/{collection_name}/points ``` --> -This method has additional parameters `?with_vector` and `?with_payload`. +This method has additional parameters `with_vector` and `with_payload`. Using these parameters, you can select parts of the point you want as a result. Excluding helps you not to waste traffic transmitting useless data. @@ -300,7 +372,6 @@ POST /collections/{collection_name}/points/scroll ] }, "limit": 1, - "offset": 0, "with_payload": true, "with_vector": false } diff --git a/qdrant-landing/content/documentation/quick_start.md b/qdrant-landing/content/documentation/quick_start.md index 485bddc7f..b869566ed 100644 --- a/qdrant-landing/content/documentation/quick_start.md +++ b/qdrant-landing/content/documentation/quick_start.md @@ -35,14 +35,11 @@ For additional information please refer to the [API documentation](https://qdran ### Create collection First - let's create a collection with dot-production metric. ```bash -curl -X POST 'http://localhost:6333/collections' \ +curl -X PUT 'http://localhost:6333/collections/test_collection' \ -H 'Content-Type: application/json' \ --data-raw '{ - "create_collection": { - "name": "test_collection", - "vector_size": 4, - "distance": "Dot" - } + "vector_size": 4, + "distance": "Dot" }' ``` @@ -90,19 +87,17 @@ Expected response: Let's now add vectors with some payload: ```bash -curl -L -X POST 'http://localhost:6333/collections/test_collection?wait=true' \ +curl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \ -H 'Content-Type: application/json' \ --data-raw '{ - "upsert_points": { "points": [ - {"id": 1, "vector": [0.05, 0.61, 0.76, 0.74], "payload": {"city": "Berlin"}}, - {"id": 2, "vector": [0.19, 0.81, 0.75, 0.11], "payload": {"city": ["Berlin", "London"]}}, - {"id": 3, "vector": [0.36, 0.55, 0.47, 0.94], "payload": {"city": ["Berlin", "Moscow"]}}, - {"id": 4, "vector": [0.18, 0.01, 0.85, 0.80], "payload": {"city": ["London", "Moscow"]}}, - {"id": 5, "vector": [0.24, 0.18, 0.22, 0.44], "payload": {"count": 0}}, + {"id": 1, "vector": [0.05, 0.61, 0.76, 0.74], "payload": {"city": {"type": "keyword", "value": "Berlin"}}}, + {"id": 2, "vector": [0.19, 0.81, 0.75, 0.11], "payload": {"city": {"type": "keyword", "value": ["Berlin", "London"] }}}, + {"id": 3, "vector": [0.36, 0.55, 0.47, 0.94], "payload": {"city": {"type": "keyword", "value": ["Berlin", "Moscow"] }}}, + {"id": 4, "vector": [0.18, 0.01, 0.85, 0.80], "payload": {"city": {"type": "keyword", "value": ["London", "Moscow"]}}}, + {"id": 5, "vector": [0.24, 0.18, 0.22, 0.44], "payload": {"count": {"type": "integer", "value": [0]}}}, {"id": 6, "vector": [0.35, 0.08, 0.11, 0.44]} ] - } }' ``` diff --git a/qdrant-landing/content/documentation/storage.md b/qdrant-landing/content/documentation/storage.md index f6fb56bbb..a493939b2 100644 --- a/qdrant-landing/content/documentation/storage.md +++ b/qdrant-landing/content/documentation/storage.md @@ -43,6 +43,6 @@ In the first step, the data is written to the Write-ahead-log(WAL), which orders Once a change has been added to the WAL, it will not be lost even if power loss occurs. Then the changes go into the segments. -Each segment stores the last version of the change applied to it. -If the new change has a sequential number less than the current version of the segment, the segment will ignore the change. -This mechanism allows Qdrant to safely and efficiently restore the storage from the WAL in case of an abnormal shutdown. \ No newline at end of file +Each segment stores the last version of the change applied to it as well as version of each individual point. +If the new change has a sequential number less than the current version of the point, the updater will ignore the change. +This mechanism allows Qdrant to safely and efficiently restore the storage from the WAL in case of an abnormal shutdown. diff --git a/qdrant-landing/themes/qdrant/layouts/partials/second_header.html b/qdrant-landing/themes/qdrant/layouts/partials/second_header.html index 5f99c71bc..6580c2e02 100644 --- a/qdrant-landing/themes/qdrant/layouts/partials/second_header.html +++ b/qdrant-landing/themes/qdrant/layouts/partials/second_header.html @@ -5,7 +5,7 @@