Skip to main content

Overview

Qdrant is a vector similarity search engine written in Rust that provides high performance, rich filtering, and advanced features like payload-based filtering and hybrid search.

Setup

Run Qdrant locally with Docker:
docker run -p 6333:6333 qdrant/qdrant
Then in Flowise:
Qdrant Server URL: http://localhost:6333
Collection Name: my-collection

Configuration

Required Parameters

qdrantServerUrl
string
required
URL of your Qdrant instance:
  • Local: http://localhost:6333
  • Cloud: https://your-cluster.cloud.qdrant.io
qdrantCollection
string
required
Name of the collection to use (created automatically if doesn’t exist)
embeddings
Embeddings
required
Embedding model for vector generation

Optional Parameters

credential
credential
Qdrant API key credential (required for Qdrant Cloud)
document
Document[]
Documents to upsert into the collection
recordManager
RecordManager
Track indexed documents to prevent duplication
qdrantVectorDimension
number
default:1536
Vector dimension size (must match embedding model):
  • OpenAI ada-002: 1536
  • OpenAI text-embedding-3-small: 1536
  • OpenAI text-embedding-3-large: 3072
qdrantSimilarity
string
default:"Cosine"
Distance metric for similarity:
  • Cosine - Normalized similarity (recommended)
  • Euclid - Euclidean distance
  • Dot - Dot product
contentPayloadKey
string
default:"content"
Key for storing document content in payload
metadataPayloadKey
string
default:"metadata"
Key for storing document metadata in payload
batchSize
number
Batch size for upserting vectors. Useful for large datasets:
batchSize: 100  // Process 100 vectors at a time
qdrantCollectionConfiguration
json
Advanced collection configuration (see Qdrant docs):
{
  "optimizers_config": {
    "indexing_threshold": 10000
  }
}
qdrantFilter
json
Filter search results by payload:
{
  "must": [
    { "key": "category", "match": { "value": "docs" } }
  ]
}
topK
number
default:4
Number of results to return
fileUpload
boolean
Enable file uploads scoped to chat session

Usage Examples

Basic Local Setup

# Start Qdrant
docker run -p 6333:6333 -v $(pwd)/qdrant_storage:/qdrant/storage qdrant/qdrant
// In Flowise
Qdrant Server URL: http://localhost:6333
Qdrant Collection: my-documents
Vector Dimension: 1536
Similarity: Cosine
Embeddings: OpenAI Embeddings

Qdrant Cloud Production

// Cloud configuration
Qdrant Server URL: https://abc-example.cloud.qdrant.io
Credential: Qdrant API Key
Qdrant Collection: production-kb
Vector Dimension: 1536
Similarity: Cosine

Batch Upsert for Large Datasets

// Process large document sets efficiently
Document: PDF Folder Loader (1000+ files)
Qdrant Collection: large-corpus
Batch Size: 100
Vector Dimension: 1536
Embeddings: OpenAI Embeddings

With Advanced Filtering

// Complex filter conditions
{
  "qdrantFilter": {
    "must": [
      {
        "key": "metadata.category",
        "match": { "value": "technical" }
      },
      {
        "key": "metadata.year",
        "range": {
          "gte": 2023
        }
      }
    ],
    "should": [
      {
        "key": "metadata.priority",
        "match": { "value": "high" }
      }
    ]
  }
}

Custom Payload Keys

// Customize storage structure
Content Payload Key: text_content
Metadata Payload Key: doc_metadata
Vector Dimension: 1536

Qdrant Filter Syntax

Qdrant supports powerful filtering:
// Must conditions (AND)
{
  "must": [
    { "key": "category", "match": { "value": "docs" } },
    { "key": "language", "match": { "value": "en" } }
  ]
}

// Range filters
{
  "must": [
    {
      "key": "price",
      "range": {
        "gte": 10.0,
        "lt": 100.0
      }
    }
  ]
}

// Should conditions (OR)
{
  "should": [
    { "key": "tag", "match": { "value": "important" } },
    { "key": "tag", "match": { "value": "urgent" } }
  ]
}

// Must NOT conditions
{
  "must_not": [
    { "key": "status", "match": { "value": "archived" } }
  ]
}

// Nested conditions
{
  "must": [
    {
      "should": [
        { "key": "type", "match": { "value": "article" } },
        { "key": "type", "match": { "value": "blog" } }
      ]
    },
    { "key": "published", "match": { "value": true } }
  ]
}

// Array matching
{
  "must": [
    {
      "key": "tags",
      "match": {
        "any": ["AI", "ML", "NLP"]
      }
    }
  ]
}

Best Practices

Collection Design

  • Create separate collections per domain
  • Use descriptive collection names
  • Set appropriate vector dimensions
  • Choose right distance metric

Performance

  • Use batch upserts for large datasets
  • Enable indexing for frequent filters
  • Monitor collection size
  • Use appropriate batch sizes

Filtering

  • Index frequently filtered fields
  • Use payload schema for validation
  • Combine filters efficiently
  • Test filter performance

Scaling

  • Use Qdrant Cloud for production
  • Monitor memory usage
  • Implement sharding for huge datasets
  • Set up replicas for HA

Advanced Features

Payload Schema

Define schema for validation:
{
  "qdrantCollectionConfiguration": {
    "payload_schema": {
      "category": { "type": "keyword" },
      "year": { "type": "integer" },
      "rating": { "type": "float" }
    }
  }
}

Optimizer Configuration

{
  "qdrantCollectionConfiguration": {
    "optimizers_config": {
      "deleted_threshold": 0.2,
      "vacuum_min_vector_number": 1000,
      "default_segment_number": 5,
      "indexing_threshold": 20000
    }
  }
}

Quantization for Memory Efficiency

{
  "qdrantCollectionConfiguration": {
    "quantization_config": {
      "scalar": {
        "type": "int8",
        "quantile": 0.99
      }
    }
  }
}

Common Issues

Can’t connect to Qdrant serverSolution:
  • Verify Qdrant is running: curl http://localhost:6333
  • Check URL format includes http/https
  • For cloud: verify API key is correct
  • Check firewall/network settings
Error: “Vector dimension does not match collection”Solution:
  • Set correct vector dimension parameter
  • Ensure embeddings match dimension
  • Delete and recreate collection if needed
  • Verify embedding model configuration
Error when creating collectionSolution:
  • Collections are auto-created, this is normal
  • Use existing collection or delete old one
  • Check if dimension/metric matches
Search is taking too longSolution:
  • Create indexes on filtered fields
  • Reduce topK value
  • Use more restrictive filters
  • Consider quantization
  • Check collection size and resources

Monitoring

Qdrant provides telemetry and monitoring:
# Health check
curl http://localhost:6333/healthz

# Collection info
curl http://localhost:6333/collections/my-collection

# Cluster info
curl http://localhost:6333/cluster
Metrics to monitor:
  • Vector count per collection
  • Query latency (p50, p95, p99)
  • Memory usage
  • Disk usage
  • Indexing status

Outputs

retriever
VectorStoreRetriever
Retriever interface with configured filters and topK
vectorStore
QdrantVectorStore
Direct vector store for custom operations

Build docs developers (and LLMs) love