Qdrant icon

Qdrant

Official n8n node to interface with the Qdrant - https://qdrant.tech

Overview

The node provides an interface to Qdrant, a vector search engine and database designed for managing and querying vector embeddings. Specifically, the "Create Collection" operation allows users to create a new collection in Qdrant with customizable parameters such as vector configuration, sharding, replication, and indexing options.

This node is beneficial when you want to programmatically manage vector collections for similarity search, machine learning, or AI applications within an n8n workflow. For example, you can automate the creation of collections tailored to different datasets or use cases, specifying how vectors are stored and indexed for efficient retrieval.

Practical examples:

  • Creating a collection to store image embeddings for a visual search application.
  • Setting up a text embedding collection with custom sharding and replication for scalable NLP tasks.
  • Initializing a collection by copying data from an existing one to quickly clone configurations.

Properties

Name Meaning
Collection Name The name of the collection to be created.
Vectors JSON object defining the vector parameters of the collection (e.g., size, distance metric).
Shard Number Number of shards to split the collection into, affecting distribution and scalability.
Sharding Method Method of sharding to use; options include "auto" or "custom". Defaults to "auto" if not specified.
Replication Factor Number of replicas for each shard. Default is 1, minimum allowed is 1.
Write Consistency Factor Number of replicas that must confirm a write operation for it to be considered successful.
On Disk Payload Boolean flag indicating if the point’s payload should be stored on disk instead of memory. If true, payloads are read from disk on demand.
HNSW Config JSON object with custom parameters for the Hierarchical Navigable Small World (HNSW) index used for approximate nearest neighbor search.
WAL Config JSON object with custom parameters for the Write-Ahead Log (WAL), which affects durability and performance.
Optimizers Config JSON object with custom parameters for optimizer settings that influence indexing and query performance.
Init From JSON object specifying another collection from which to copy data during initialization.
Quantization Config JSON object defining quantization parameters to reduce vector size and improve storage efficiency. If omitted or null, quantization is disabled.
Sparse Vectors JSON object defining sparse vector parameters for the collection, allowing support for sparse vector types.
Strict Mode Config JSON object configuring strict mode behavior for the collection, potentially enforcing stricter validation or operational rules.

Output

The node outputs JSON data representing the response from the Qdrant API after attempting to create the collection. This typically includes confirmation of the collection creation, any metadata about the collection, and status information.

If the operation supports binary data output (not indicated here), it would represent raw data related to the collection or its contents, but this operation primarily deals with JSON responses.

Dependencies

  • Requires an API key credential for authenticating with the Qdrant service.
  • Needs the base URL of the Qdrant instance configured in the credentials.
  • The node depends on the Qdrant REST API being accessible and properly configured.

Troubleshooting

  • Common issues:

    • Invalid or missing collection name causing request failure.
    • Incorrectly formatted JSON in vector or config fields leading to API errors.
    • Network connectivity problems to the Qdrant server.
    • Insufficient permissions or invalid API key resulting in authentication errors.
  • Error messages and resolutions:

    • 400 Bad Request: Check that all required fields are correctly filled and JSON syntax is valid.
    • 401 Unauthorized: Verify that the API key credential is correct and has necessary permissions.
    • 409 Conflict: A collection with the same name might already exist; choose a different name or delete the existing collection first.
    • 500 Internal Server Error: Could indicate server-side issues; retry later or check Qdrant server logs.

Links and References

Discussion