Skip to main content
View source

Milvus

View as Markdown

A RocketRide store node that persists embedded documents in a Milvus vector database and retrieves them by semantic or keyword similarity search.

What it does

Stores pre-embedded document chunks in a Milvus collection and answers questions against them using semantic (vector) or keyword search. Supports both self-hosted Milvus and Zilliz Cloud. Documents must be run through an embedding node before reaching this node: ingesting a chunk without an embedding raises an error.

Uses pymilvus (MilvusClient). The collection is created automatically on first document ingest if it does not exist, with the vector dimension taken from the incoming embeddings. Re-ingesting a document replaces it: all existing entities with the same objectId are deleted before the new chunks are upserted in batches (default: 50 chunks per batch).

Documents removed at the source are soft-deleted by default. A markDeleted call flips the isDeleted metadata flag rather than dropping the entities, and searches exclude soft-deleted documents unless the filter explicitly asks for them. markActive reverses the flag if a document comes back. A hard remove deletes the entities outright.

When the node configuration is saved, the engine probes the connection (5-second timeout) and validates the collection name: 1-255 characters, letters, digits, and underscores only, starting with a letter or underscore.


Configuration

Lanes

Lane inLane outDescription
documents(none)Ingest pre-embedded documents into the collection
questionsdocumentsReturn matching documents
questionsanswersReturn matching documents as an answer
questionsquestionsEnrich the question with matching documents for downstream nodes

Fields

FieldTypeDescription
profilestringDefault "cloud". Connect to...
providerstringDefault "milvus".

Advanced settings

These keys are read from the node config but have no dedicated UI field:

KeyDefaultDescription
similarityCOSINEMetric type for the vector index. Accepted values: L2, IP, COSINE, JACCARD, HAMMING, BM25. Any other value raises an error at startup.
timeout60Connection and operation timeout in seconds (minimum 1).
bulkInsertBatchSize50Number of chunks per bulk upsert batch (minimum 1).
renderChunkSize33554432Number of chunks fetched per group when rendering a full document.

Profiles

ProfilemodeDefault hostDefault portConnection
Milvus cloud server (default)cloud(your Zilliz endpoint)443https://<host> with apikey as token
Your own Milvus serverlocallocalhost19530http://<host>:<port>, no token required

Collection schema & indexing

The auto-created collection has four fields:

FieldTypeNotes
idINT64, primary keyGenerated per chunk from the UUID1 timestamp combined with 27 random bits
vectorFLOAT_VECTORDimension taken from the first ingested embeddings
contentVARCHAR (max length 65535)The chunk text
metaJSONChunk metadata used for filtering (objectId, nodeId, parent, chunkId, permissionId, isDeleted, and others)

Indexes: an IVF_FLAT vector index (nlist: 1024) using the configured similarity metric, and an STL_SORT scalar index on id.


Search behavior

Semantic search requires the question to carry an embedding (bind the pipeline to an embedding node) and verifies the embedding model matches the collection. Non-zero result offsets are not supported and raise an error. The query limit is raised to 25 whenever the requested limit is 10 or lower.

Scoring: with the COSINE metric, the raw Milvus distance is rescaled to [0, 1] via (distance + 1) / 2, where 1 means most similar. For other metrics a sigmoid of distance / -100 is used. Results below the score threshold are discarded.

Keyword search runs a substring match (content like '%query%') combined with the same metadata filters as semantic search.

All filter values (object IDs, node IDs, parents, permissions, and the keyword query) are escaped before interpolation into Milvus filter expressions.


Rendering

Given an objectId, the node can rehydrate the complete document text by fetching its chunks in chunkId order, in groups of renderChunkSize, and streaming the joined text to the output callback. Rendering only applies to objects that were vectorized by this pipeline (objects without a vector batch ID fall through to the next driver).

The store counts vectors (chunks), not documents: the node-reported document count is the number of entities in the collection.


Schema

FieldTypeDescriptionDefault
milvus.profilestringType of Milvus host
Connect to...
"cloud"
milvus.providerstringconst: "milvus"
vector.cloud.hostEnter the server IP address e.g. ..zillizcloud.com
vector.cloud.port443
vector.local.host"localhost"
vector.local.port19530

Dependencies

  • environs
  • marshmallow
  • grpcio
  • milvus-lite ; platform_system != "Windows"
  • pandas
  • protobuf
  • ujson
  • pymilvus
  • numpy