mirror of
https://github.com/qdrant/landing_page.git
synced 2026-09-26 14:38:30 +02:00
docs auto-sync
This commit is contained in:
@@ -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
|
### 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.
|
In Qdrant, each collection is split into shards. Each shard has a separate Write-Ahead-Log (WAL), which is responsible for ordering operations.
|
||||||
|
|||||||
@@ -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.
|
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.
|
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 condition will be considered satisfied if at least one value meets the condition.
|
|
||||||
|
|
||||||
The filtering process is discussed in detail in the section [Filtering](../filtering).
|
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
|
||||||
|
|
||||||
Bool - is binary value equals to `true` or `false`.
|
Bool - binary value. Equals to `true` or `false`.
|
||||||
|
|
||||||
Example of single and multiple `bool` values:
|
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.
|
Coordinate should be described as an object containing two fields: `lon` - for longitude, and `lat` - for latitude.
|
||||||
|
|
||||||
## Create point with payload
|
## Create point with payload
|
||||||
|
REST API ([Schema](https://qdrant.github.io/qdrant/redoc/index.html#tag/points/operation/upsert_points))
|
||||||
```http
|
```http
|
||||||
PUT /collections/{collection_name}/points
|
PUT /collections/{collection_name}/points
|
||||||
|
|
||||||
@@ -278,19 +277,18 @@ client.clear_payload(
|
|||||||
|
|
||||||
## Payload indexing
|
## Payload indexing
|
||||||
|
|
||||||
To search more efficiently with filters, Qdrant allows you to specify payload fields as indexed.
|
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.
|
||||||
For marked fields Qdrant will build an index for the corresponding types of queries.
|
|
||||||
|
|
||||||
The indexed fields also affect the vector index. See [Indexing](../indexing) for details.
|
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.
|
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.
|
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:
|
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
|
```http
|
||||||
PUT /collections/{collection_name}/index
|
PUT /collections/{collection_name}/index
|
||||||
|
|||||||
Regular → Executable
Reference in New Issue
Block a user