Qdrant API
Project description
API description for Qdrant vector search engine. This document describes CRUD and search operations on collections of points (vectors with payload). Qdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account. ## Examples This examples cover the most basic use-cases - collection creation and basic vector search. ### Create collection First - let's create a collection with dot-production metric. ``` curl -X PUT 'http://localhost:6333/collections/test_collection' -H 'Content-Type: application/json' –data-raw '{ "vectors": { "size": 4, "distance": "Dot" } }' ``` Expected response: ``` { "result": true, "status": "ok", "time": 0.031095451 } ``` We can ensure that collection was created: ``` curl 'http://localhost:6333/collections/test_collection' ``` Expected response: ``` { "result": { "status": "green", "vectors_count": 0, "segments_count": 5, "disk_data_size": 0, "ram_data_size": 0, "config": { "params": { "vectors": { "size": 4, "distance": "Dot" } }, "hnsw_config": { "m": 16, "ef_construct": 100, "full_scan_threshold": 10000 }, "optimizer_config": { "deleted_threshold": 0.2, "vacuum_min_vector_number": 1000, "max_segment_number": 5, "memmap_threshold": 50000, "indexing_threshold": 20000, "flush_interval_sec": 1 }, "wal_config": { "wal_capacity_mb": 32, "wal_segments_ahead": 0 } } }, "status": "ok", "time": 2.1199e-05 } ``` ### Add points Let's now add vectors with some payload: ``` curl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' -H 'Content-Type: application/json' –data-raw '{ "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": 6, "vector": [0.35, 0.08, 0.11, 0.44]} ] }' ``` Expected response: ``` { "result": { "operation_id": 0, "status": "completed" }, "status": "ok", "time": 0.000206061 } ``` ### Search with filtering Let's start with a basic request: ``` curl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' -H 'Content-Type: application/json' –data-raw '{ "vector": [0.2,0.1,0.9,0.7], "top": 3 }' ``` Expected response: ``` { "result": [ { "id": 4, "score": 1.362, "payload": null, "version": 0 }, { "id": 1, "score": 1.273, "payload": null, "version": 0 }, { "id": 3, "score": 1.208, "payload": null, "version": 0 } ], "status": "ok", "time": 0.000055785 } ``` But result is different if we add a filter: ``` curl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' -H 'Content-Type: application/json' –data-raw '{ "filter": { "should": [ { "key": "city", "match": { "value": "London" } } ] }, "vector": [0.2, 0.1, 0.9, 0.7], "top": 3 }' ``` Expected response: ``` { "result": [ { "id": 4, "score": 1.362, "payload": null, "version": 0 }, { "id": 2, "score": 0.871, "payload": null, "version": 0 } ], "status": "ok", "time": 0.000093972 } ``` # noqa: E501
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qdrant_openapi-1.0.1.tar.gz.
File metadata
- Download URL: qdrant_openapi-1.0.1.tar.gz
- Upload date:
- Size: 212.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb90539b98a5ce4de17685c2e751c55777bf83a6b0dbea60059284b5c633cca9
|
|
| MD5 |
0b33978da416de702d836f87b280508e
|
|
| BLAKE2b-256 |
728ecdce6ade1cf34288b7b4a4ad78a35b89faff7f16d416781ebad57dba3149
|
File details
Details for the file qdrant_openapi-1.0.1-py3-none-any.whl.
File metadata
- Download URL: qdrant_openapi-1.0.1-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
012094036e08671145c373bc9531f4d72afe63973dbbf9c2eec8d20ac56d9bc3
|
|
| MD5 |
e2bc2267fb3df4dcd218a93248ee8a83
|
|
| BLAKE2b-256 |
0d5f66b9ceaa257eb779fbf23003aaf37e01351a322f2b5131ad264f5259cf0f
|