qdrant-openapi 1.0.1
Qdrant API
License: Apache 2.0
Requires Python: >=3.6
Keywords: OpenAPI, OpenAPI-Generator, Qdrant API

    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 &#x60;should&#x60;, &#x60;must&#x60; and &#x60;must_not&#x60; 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&#39;s create a collection with dot-production metric. &#x60;&#x60;&#x60; curl -X PUT &#39;http://localhost:6333/collections/test_collection&#39; \   -H &#39;Content-Type: application/json&#39; \   --data-raw &#39;{     \&quot;vectors\&quot;: {       \&quot;size\&quot;: 4,       \&quot;distance\&quot;: \&quot;Dot\&quot;     }   }&#39;  &#x60;&#x60;&#x60; Expected response: &#x60;&#x60;&#x60; {     \&quot;result\&quot;: true,     \&quot;status\&quot;: \&quot;ok\&quot;,     \&quot;time\&quot;: 0.031095451 } &#x60;&#x60;&#x60; We can ensure that collection was created: &#x60;&#x60;&#x60; curl &#39;http://localhost:6333/collections/test_collection&#39; &#x60;&#x60;&#x60; Expected response: &#x60;&#x60;&#x60; {   \&quot;result\&quot;: {     \&quot;status\&quot;: \&quot;green\&quot;,     \&quot;vectors_count\&quot;: 0,     \&quot;segments_count\&quot;: 5,     \&quot;disk_data_size\&quot;: 0,     \&quot;ram_data_size\&quot;: 0,     \&quot;config\&quot;: {       \&quot;params\&quot;: {         \&quot;vectors\&quot;: {           \&quot;size\&quot;: 4,           \&quot;distance\&quot;: \&quot;Dot\&quot;         }       },       \&quot;hnsw_config\&quot;: {         \&quot;m\&quot;: 16,         \&quot;ef_construct\&quot;: 100,         \&quot;full_scan_threshold\&quot;: 10000       },       \&quot;optimizer_config\&quot;: {         \&quot;deleted_threshold\&quot;: 0.2,         \&quot;vacuum_min_vector_number\&quot;: 1000,         \&quot;max_segment_number\&quot;: 5,         \&quot;memmap_threshold\&quot;: 50000,         \&quot;indexing_threshold\&quot;: 20000,         \&quot;flush_interval_sec\&quot;: 1       },       \&quot;wal_config\&quot;: {         \&quot;wal_capacity_mb\&quot;: 32,         \&quot;wal_segments_ahead\&quot;: 0       }     }   },   \&quot;status\&quot;: \&quot;ok\&quot;,   \&quot;time\&quot;: 2.1199e-05 } &#x60;&#x60;&#x60;  ### Add points Let&#39;s now add vectors with some payload: &#x60;&#x60;&#x60; curl -L -X PUT &#39;http://localhost:6333/collections/test_collection/points?wait&#x3D;true&#39; \ -H &#39;Content-Type: application/json&#39; \ --data-raw &#39;{   \&quot;points\&quot;: [     {\&quot;id\&quot;: 1, \&quot;vector\&quot;: [0.05, 0.61, 0.76, 0.74], \&quot;payload\&quot;: {\&quot;city\&quot;: \&quot;Berlin\&quot;}},     {\&quot;id\&quot;: 2, \&quot;vector\&quot;: [0.19, 0.81, 0.75, 0.11], \&quot;payload\&quot;: {\&quot;city\&quot;: [\&quot;Berlin\&quot;, \&quot;London\&quot;] }},     {\&quot;id\&quot;: 3, \&quot;vector\&quot;: [0.36, 0.55, 0.47, 0.94], \&quot;payload\&quot;: {\&quot;city\&quot;: [\&quot;Berlin\&quot;, \&quot;Moscow\&quot;] }},     {\&quot;id\&quot;: 4, \&quot;vector\&quot;: [0.18, 0.01, 0.85, 0.80], \&quot;payload\&quot;: {\&quot;city\&quot;: [\&quot;London\&quot;, \&quot;Moscow\&quot;] }},     {\&quot;id\&quot;: 5, \&quot;vector\&quot;: [0.24, 0.18, 0.22, 0.44], \&quot;payload\&quot;: {\&quot;count\&quot;: [0]}},     {\&quot;id\&quot;: 6, \&quot;vector\&quot;: [0.35, 0.08, 0.11, 0.44]}   ] }&#39; &#x60;&#x60;&#x60; Expected response: &#x60;&#x60;&#x60; {     \&quot;result\&quot;: {         \&quot;operation_id\&quot;: 0,         \&quot;status\&quot;: \&quot;completed\&quot;     },     \&quot;status\&quot;: \&quot;ok\&quot;,     \&quot;time\&quot;: 0.000206061 } &#x60;&#x60;&#x60; ### Search with filtering Let&#39;s start with a basic request: &#x60;&#x60;&#x60; curl -L -X POST &#39;http://localhost:6333/collections/test_collection/points/search&#39; \ -H &#39;Content-Type: application/json&#39; \ --data-raw &#39;{     \&quot;vector\&quot;: [0.2,0.1,0.9,0.7],     \&quot;top\&quot;: 3 }&#39; &#x60;&#x60;&#x60; Expected response: &#x60;&#x60;&#x60; {     \&quot;result\&quot;: [         { \&quot;id\&quot;: 4, \&quot;score\&quot;: 1.362, \&quot;payload\&quot;: null, \&quot;version\&quot;: 0 },         { \&quot;id\&quot;: 1, \&quot;score\&quot;: 1.273, \&quot;payload\&quot;: null, \&quot;version\&quot;: 0 },         { \&quot;id\&quot;: 3, \&quot;score\&quot;: 1.208, \&quot;payload\&quot;: null, \&quot;version\&quot;: 0 }     ],     \&quot;status\&quot;: \&quot;ok\&quot;,     \&quot;time\&quot;: 0.000055785 } &#x60;&#x60;&#x60; But result is different if we add a filter: &#x60;&#x60;&#x60; curl -L -X POST &#39;http://localhost:6333/collections/test_collection/points/search&#39; \ -H &#39;Content-Type: application/json&#39; \ --data-raw &#39;{     \&quot;filter\&quot;: {         \&quot;should\&quot;: [             {                 \&quot;key\&quot;: \&quot;city\&quot;,                 \&quot;match\&quot;: {                     \&quot;value\&quot;: \&quot;London\&quot;                 }             }         ]     },     \&quot;vector\&quot;: [0.2, 0.1, 0.9, 0.7],     \&quot;top\&quot;: 3 }&#39; &#x60;&#x60;&#x60; Expected response: &#x60;&#x60;&#x60; {     \&quot;result\&quot;: [         { \&quot;id\&quot;: 4, \&quot;score\&quot;: 1.362, \&quot;payload\&quot;: null, \&quot;version\&quot;: 0 },         { \&quot;id\&quot;: 2, \&quot;score\&quot;: 0.871, \&quot;payload\&quot;: null, \&quot;version\&quot;: 0 }     ],     \&quot;status\&quot;: \&quot;ok\&quot;,     \&quot;time\&quot;: 0.000093972 } &#x60;&#x60;&#x60;   # noqa: E501