qdrant-openapi


Nameqdrant-openapi JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryQdrant API
upload_time2023-12-21 02:36:00
maintainer
docs_urlNone
authorOpenAPI Generator community
requires_python
licenseApache 2.0
keywords openapi openapi-generator qdrant api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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 } ``` 



            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "qdrant-openapi",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "OpenAPI,OpenAPI-Generator,Qdrant API",
    "author": "OpenAPI Generator community",
    "author_email": "andrey@vasnetsov.com",
    "download_url": "https://files.pythonhosted.org/packages/24/19/def854b6f14d2cee1755067d29421f84f3d8f1f8e5375a89adcf28bf4225/qdrant_openapi-1.0.0.tar.gz",
    "platform": null,
    "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 } ``` \n\n\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Qdrant API",
    "version": "1.0.0",
    "project_urls": null,
    "split_keywords": [
        "openapi",
        "openapi-generator",
        "qdrant api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4652b82c914ee121c0b8bc6fe4cf7ab27459e268c437cd8a2c485ff3f79c45c2",
                "md5": "5985ab632415d63ffc22ad9d28efdba6",
                "sha256": "31a1c62ecf0be1da42e70441945e963d3ede9e18aadd7c9a20cae21d2a2c4341"
            },
            "downloads": -1,
            "filename": "qdrant_openapi-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5985ab632415d63ffc22ad9d28efdba6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 678758,
            "upload_time": "2023-12-21T02:35:57",
            "upload_time_iso_8601": "2023-12-21T02:35:57.572094Z",
            "url": "https://files.pythonhosted.org/packages/46/52/b82c914ee121c0b8bc6fe4cf7ab27459e268c437cd8a2c485ff3f79c45c2/qdrant_openapi-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2419def854b6f14d2cee1755067d29421f84f3d8f1f8e5375a89adcf28bf4225",
                "md5": "383eeee6859781e71f7cd60f31271925",
                "sha256": "cd40d2e0934f6f0e1446c903a345ed6784313beebf0f56663c1897ca8991ca6a"
            },
            "downloads": -1,
            "filename": "qdrant_openapi-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "383eeee6859781e71f7cd60f31271925",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 201915,
            "upload_time": "2023-12-21T02:36:00",
            "upload_time_iso_8601": "2023-12-21T02:36:00.115802Z",
            "url": "https://files.pythonhosted.org/packages/24/19/def854b6f14d2cee1755067d29421f84f3d8f1f8e5375a89adcf28bf4225/qdrant_openapi-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-21 02:36:00",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "qdrant-openapi"
}
        
Elapsed time: 0.14395s