Qdrant
Store rows with their vectors in Qdrant and search them by similarity with payload filters. Typical uses: give an LLM the closest documents (RAG), find similar records.
qdrant pingqdrant collection_createqdrant collectionsqdrant collection_dropqdrant insertqdrant insertqdrant index_createqdrant collection_infoqdrant searchqdrant searchqdrant findqdrant findqdrant getqdrant getqdrant countqdrant countqdrant deleteqdrant delete_whereqdrant requestqdrant request

qdrant ping <config>


Description

    Test the connection: {engine, version}

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
admin
qdrant ping "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}"
mentdb
{"engine": "qdrant", "version": "1.20.2"}

qdrant collection_create <config> <collection> <json_options>


Description

    Create a collection. Options: size (required: the dimension of the vectors, 1 to 65536), distance (Cosine, Dot, Euclid, Manhattan; Cosine by default), on_disk, hnsw_m, hnsw_ef_construct. Returns {created}; an error if it exists

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
    collection:   The collection: 1 to 255 letters, digits, _ . - - String - required
    json_options:   The options: see the description - String - required
admin
qdrant collection_create "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq" "{\"size\": 3}"
mentdb
{"created": "faq"}
Euclidean distance, vectors on disk (fixed result: real Qdrant 1.20.2)
admin
qdrant collection_create "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq_euc" "{\"size\": 3, \"distance\": \"Euclid\", \"on_disk\": true}"
mentdb
{"created": "faq_euc"}

qdrant collections <config>


Description

    The names of the collections, as a JSON array

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
admin
qdrant collections "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}"
mentdb
["faq", "faq_euc"]

qdrant collection_drop <config> <collection>


Description

    Delete a collection and its points. Returns {dropped: name}, or {dropped: null} if it did not exist

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
    collection:   The collection: 1 to 255 letters, digits, _ . - - String - required
admin
qdrant collection_drop "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq_euc"
mentdb
{"dropped": "faq_euc"}
no such collection (fixed result: real Qdrant 1.20.2)
admin
qdrant collection_drop "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "nothing"
mentdb
{"dropped": null}

qdrant insert <config> <collection> <rows_json>


Description

    Insert or replace points from rows (see the description). Waits until the points are written. Returns {inserted, errors}

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
    collection:   The collection: 1 to 255 letters, digits, _ . - - String - required
    rows_json:   The rows: a JSON array of objects with an id, a vector field and other fields; or a JSON array of texts (the output of llm chunk) with the parameter vectors - String - required
admin
qdrant insert "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq" "[{\"id\": 1, \"title\": \"Refund policy\", \"lang\": \"en\", \"embedding\": [0.9, 0.1, 0]}, {\"id\": 2, \"title\": \"Delivery times\", \"lang\": \"en\", \"embedding\": [0.1, 0.9, 0]}, {\"id\": \"doc-3\", \"title\": \"Retours\", \"lang\": \"fr\", \"embedding\": [0.8, 0.2, 0.1]}]"
mentdb
{"inserted": 3, "errors": []}

qdrant insert <config> <collection> <rows_json> <json_options>


Description

    Insert with options: id_field (id), vector_field (embedding), text_field (text), vectors, fields, batch_size (256, 10000 at most), wait (true)

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
    collection:   The collection: 1 to 255 letters, digits, _ . - - String - required
    rows_json:   The rows: a JSON array of objects with an id, a vector field and other fields; or a JSON array of texts (the output of llm chunk) with the parameter vectors - String - required
    json_options:   The options: see the description - String - required
admin
qdrant insert "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq" "[\"Refunds are paid within 14 days.\", \"Our shops open at 8 am.\"]" "{\"vectors\": [[0.85, 0.15, 0.05], [0, 0.2, 0.95]]}"
mentdb
{"inserted": 2, "errors": []}
Index a document: chunks, vectors, points (fixed result: real Qdrant 1.20.2, run with the 3-value vectors of the examples above in place of the llm vectors, which need a provider)
admin
-> "[chunks]" (llm chunk (file load "docs/faq.txt") "{\"size\": 800}"); -> "[vectors]" (llm embed_batch [chunks] "{\"provider\": \"openai\", \"model\": \"text-embedding-3-small\", \"api_key\": \"openai_api_key\"}"); qdrant insert "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq" [chunks] (concat "{\"vectors\": " [vectors] "}");
mentdb
{"inserted": 2, "errors": []}

qdrant index_create <config> <collection> <field> <type>


Description

    Create a payload index on a field, for fast filters: keyword, integer, float, bool, geo, datetime, text, uuid. Returns {indexed, type}

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
    collection:   The collection: 1 to 255 letters, digits, _ . - - String - required
    field:   The payload field - String - required
    type:   The type of the index - String - required
admin
qdrant index_create "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq" "lang" "keyword"
mentdb
{"indexed": "lang", "type": "keyword"}

qdrant collection_info <config> <collection>


Description

    The state of a collection: {status, points_count, indexed_vectors_count, segments_count, size, distance, payload_schema}

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
    collection:   The collection: 1 to 255 letters, digits, _ . - - String - required
admin
qdrant collection_info "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq"
mentdb
{"status": "green", "points_count": 5, "indexed_vectors_count": 0, "segments_count": 5, "size": 3, "distance": "Cosine", "payload_schema": {"lang": {"data_type": "keyword", "points": 3}}}

qdrant find <config> <collection> <filter_json>


Description

    The points matching a filter ({}: all), without vectors, 100 at most, in the order of the ids

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
    collection:   The collection: 1 to 255 letters, digits, _ . - - String - required
    filter_json:   The filter as a JSON object ({} or an empty text: no filter) - String - required
admin
qdrant find "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq" "{}"
mentdb
[{"id": 1, "title": "Refund policy", "lang": "en"}, {"id": 2, "title": "Delivery times", "lang": "en"}, {"id": "7ae5a3b8-ab44-30ba-b3c6-3c7c721f959f", "title": "Retours", "lang": "fr", "source_id": "doc-3"}, {"id": "ba60c502-ea42-34a6-88aa-96329f33b3d5", "text": "Our shops open at 8 am."}, {"id": "fd8dfec6-c962-374d-ad18-d1e621f60a6b", "text": "Refunds are paid within 14 days."}]

qdrant find <config> <collection> <filter_json> <json_options>


Description

    Find with options: limit (100, 100000 at most), skip, fields, with_vector, vector_field

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
    collection:   The collection: 1 to 255 letters, digits, _ . - - String - required
    filter_json:   The filter as a JSON object ({} or an empty text: no filter) - String - required
    json_options:   The options: see the description - String - required
admin
qdrant find "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq" "{\"must\": [{\"key\": \"lang\", \"match\": {\"value\": \"en\"}}]}" "{\"limit\": 2, \"skip\": 1, \"fields\": [\"title\"]}"
mentdb
[{"id": 2, "title": "Delivery times"}]

qdrant get <config> <collection> <id>


Description

    A point by its id, as an object; null if absent

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
    collection:   The collection: 1 to 255 letters, digits, _ . - - String - required
    id:   The id - String - required
admin
qdrant get "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq" "doc-3"
mentdb
{"id": "7ae5a3b8-ab44-30ba-b3c6-3c7c721f959f", "title": "Retours", "lang": "fr", "source_id": "doc-3"}
absent (fixed result: real Qdrant 1.20.2)
admin
qdrant get "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq" "99"
mentdb
null

qdrant get <config> <collection> <id> <json_options>


Description

    Get with options: with_vector, vector_field

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
    collection:   The collection: 1 to 255 letters, digits, _ . - - String - required
    id:   The id - String - required
    json_options:   The options: see the description - String - required
admin
qdrant get "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq" "2" "{\"with_vector\": true}"
mentdb
{"id": 2, "embedding": [0.11043153, 0.9938837, 0], "title": "Delivery times", "lang": "en"}

qdrant count <config> <collection>


Description

    The exact number of points

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
    collection:   The collection: 1 to 255 letters, digits, _ . - - String - required
admin
qdrant count "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq"
mentdb
5

qdrant count <config> <collection> <filter_json>


Description

    The number of points matching a filter

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
    collection:   The collection: 1 to 255 letters, digits, _ . - - String - required
    filter_json:   The filter as a JSON object ({} or an empty text: no filter) - String - required
admin
qdrant count "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq" "{\"must\": [{\"key\": \"lang\", \"match\": {\"value\": \"en\"}}]}"
mentdb
2

qdrant delete <config> <collection> <id>


Description

    Delete a point by its id. Returns {deleted: 1}, or 0 if absent

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
    collection:   The collection: 1 to 255 letters, digits, _ . - - String - required
    id:   The id - String - required
admin
qdrant delete "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq" "2"
mentdb
{"deleted": 1}

qdrant delete_where <config> <collection> <filter_json>


Description

    Delete the points matching a filter (an empty filter is refused). Returns {deleted}

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
    collection:   The collection: 1 to 255 letters, digits, _ . - - String - required
    filter_json:   The filter as a JSON object ({} or an empty text: no filter) - String - required
admin
qdrant delete_where "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "faq" "{\"must\": [{\"key\": \"lang\", \"match\": {\"value\": \"fr\"}}]}"
mentdb
{"deleted": 1}

qdrant request <config> <method> <path>


Description

    Any GET or DELETE of the REST API: the raw JSON answer

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
    method:   GET, POST, PUT, PATCH, DELETE or HEAD - String - required
    path:   The path relative to the url, like /collections - String - required
admin
qdrant request "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "GET" "/collections/faq/exists"
mentdb
{"result":{"exists":true},"status":"ok","time":1.375e-6}

qdrant request <config> <method> <path> <body_json>


Description

    Any call of the REST API with a JSON body: the raw JSON answer

Parameters

    config:   The Qdrant configuration as JSON: url (http://127.0.0.1:6333), api_key (the name of a secret: secret set), allow_plain (false: an API key over http is refused unless the host is localhost, 127.0.0.1 or ::1; true: accept to send it in clear), timeout_ms (30000), max_bytes (64 MB, the limit of a response, 256 MB at most). The key goes in the api-key header - String - required
    method:   GET, POST, PUT, PATCH, DELETE or HEAD - String - required
    path:   The path relative to the url, like /collections - String - required
    body_json:   The JSON body - String - required
admin
qdrant request "{\"url\": \"http://localhost:6333\", \"api_key\": \"qdrant_api_key\"}" "POST" "/collections/faq/points/recommend" "{\"positive\": [1], \"limit\": 1}"
mentdb
{"result":[{"id":"fd8dfec6-c962-374d-ad18-d1e621f60a6b","version":3,"score":0.99628156}],"status":"ok","time":0.00128275}