From b5c81850b1bf6a74338f9043a854d2d18fcb740f Mon Sep 17 00:00:00 2001 From: qdrant Date: Tue, 4 Apr 2023 23:50:21 +0000 Subject: [PATCH] docs auto-sync --- .../content/documentation/how_to.md | 30 +++++++++++++++++++ .../content/documentation/payload.md | 14 ++++----- .../content/documentation/points.md | 0 3 files changed, 36 insertions(+), 8 deletions(-) mode change 100644 => 100755 qdrant-landing/content/documentation/points.md diff --git a/qdrant-landing/content/documentation/how_to.md b/qdrant-landing/content/documentation/how_to.md index 5daa9986a..c3ab8914b 100644 --- a/qdrant-landing/content/documentation/how_to.md +++ b/qdrant-landing/content/documentation/how_to.md @@ -508,6 +508,36 @@ client.recreate_collection( ) ``` +After upload is done, you can enable indexing by setting `indexing_threshold` to default value(20000): + +```http +PUT /collections/{collection_name} + +{ + "vectors": { + "size": 768, + "distance": "Cosine" + }, + "hnsw_config": { + "indexing_threshold": 20000 + } +} +``` + +```python +from qdrant_client import QdrantClient, models + +client = QdrantClient("localhost", port=6333) + +client.recreate_collection( + collection_name="{collection_name}", + vectors_config=models.VectorParams(size=768, distance=models.Distance.COSINE), + hnsw_config=models.HNSWConfigDiff( + indexing_threshold=20000, + ), +) +``` + ### Parallel upload into multiple shards In Qdrant, each collection is split into shards. Each shard has a separate Write-Ahead-Log (WAL), which is responsible for ordering operations. diff --git a/qdrant-landing/content/documentation/payload.md b/qdrant-landing/content/documentation/payload.md index ad3d3c895..f861b42aa 100644 --- a/qdrant-landing/content/documentation/payload.md +++ b/qdrant-landing/content/documentation/payload.md @@ -44,8 +44,7 @@ During the filtering, Qdrant will check the conditions over those values that ma For example, you will get an empty output if you apply the [range condition](../filtering/#range) on the string data. -Qdrant also allows multiple values of the same type to be stored and applied to the filter at once. -The condition will be considered satisfied if at least one value meets the condition. +However, arrays (multiple values of the same type) are treated a little bit different. When we apply a filter to an array, it will succeed if at least one of the values inside the array meets the condition. The filtering process is discussed in detail in the section [Filtering](../filtering). @@ -79,7 +78,7 @@ Example of single and multiple `float` values: ### Bool -Bool - is binary value equals to `true` or `false`. +Bool - binary value. Equals to `true` or `false`. Example of single and multiple `bool` values: @@ -135,7 +134,7 @@ Example of single and multiple `geo` values: Coordinate should be described as an object containing two fields: `lon` - for longitude, and `lat` - for latitude. ## Create point with payload - +REST API ([Schema](https://qdrant.github.io/qdrant/redoc/index.html#tag/points/operation/upsert_points)) ```http PUT /collections/{collection_name}/points @@ -278,19 +277,18 @@ client.clear_payload( ## Payload indexing -To search more efficiently with filters, Qdrant allows you to specify payload fields as indexed. -For marked fields Qdrant will build an index for the corresponding types of queries. +To search more efficiently with filters, Qdrant allows you to create indexes for payload fields by specifying the name and type of field it is intended to be. The indexed fields also affect the vector index. See [Indexing](../indexing) for details. In practice, we recommend creating an index on those fields that could potentially constrain the results the most. -For example, building an index for the object ID (if it is used in the filter) will be much more efficient than an index by its color, which has only a few possible values. +For example, using an index for the object ID will be much more efficient, being unique for each record, than an index by its color, which has only a few possible values. In compound queries involving multiple fields, Qdrant will attempt to use the most restrictive index first. To create index for the field, you can use the following: -REST API +REST API ([Schema](https://qdrant.github.io/qdrant/redoc/index.html#tag/collections/operation/create_field_index)) ```http PUT /collections/{collection_name}/index diff --git a/qdrant-landing/content/documentation/points.md b/qdrant-landing/content/documentation/points.md old mode 100644 new mode 100755