npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

n8n-nodes-milvus-enhanced

v1.1.12

Published

n8n community node for Milvus vector database with enhanced metric type switching

Downloads

88

Readme

n8n-nodes-milvus-enhanced

An n8n community node for Milvus vector database with enhanced metric type switching capabilities.

n8n.io - Workflow Automation

Features

  • New Credential: Uses a new milvusNew credential separate from built-in n8n Milvus nodes
  • AI Tool Integration: Use as an AI tool for document retrieval in LangChain workflows
  • Enhanced Metric Type Support: Switch between different similarity metrics (L2, IP, Cosine, Hamming, Jaccard)
  • Complete CRUD Operations: Insert, search, query, and delete operations
  • Collection Management: Create collections with configurable metric types
  • Advanced Search: Support for vector similarity search with customizable parameters
  • Filtering: Boolean expression filtering for precise results
  • Flexible Configuration: Configurable vector dimensions and search parameters
  • Resource Locator: Easy collection selection with dropdown list

Installation

To install this community node in your n8n instance:

Manual Installation

  1. Navigate to your n8n installation directory
  2. Install the package:
    npm install n8n-nodes-milvus-enhanced
  3. Restart n8n

Using n8n Editor UI

  1. Go to SettingsCommunity Nodes
  2. Click Install a community node
  3. Enter: n8n-nodes-milvus-enhanced
  4. Click Install

Troubleshooting Installation

If you encounter the error "The specified package could not be loaded":

  1. Check Package Structure: Ensure the package includes all required files:

    npm run build
    npm run lint
  2. Verify n8n Version: Ensure you're running n8n version 1.0.0 or higher

  3. Manual Installation: If UI installation fails, try manual installation:

    npm install n8n-nodes-milvus-enhanced
    # Restart n8n
  4. Clear Cache: Clear n8n's cache and restart:

    # Stop n8n, then:
    rm -rf ~/.n8n/cache
    # Start n8n again

Configuration

Credentials Setup

  1. Create a new "Milvus New API" credential in n8n
  2. Configure the following:
    • Base URL: Full Milvus server URL (e.g., http://10.42.0.230:19530)
    • Username: Authentication username
    • Password: Authentication password

Operations

Retrieve as Tool (AI Integration)

Use the node as an AI tool for document retrieval with embedding support:

  • Tool Description: Custom description for the AI agent
  • Collection: Select from existing collections using resource locator
  • Top K: Number of documents to retrieve
  • Search Metric Type: Override metric type for search operations (L2, IP, Cosine, Hamming, Jaccard)
  • Takes ai_embedding input from embedding models
  • Provides ai_tool output to AI agents

Insert Documents

Insert documents and vectors into a collection:

  • Collection: Target collection (resource locator)
  • Data: JSON array of documents to insert

Get Many

Retrieve documents from a collection:

  • Collection: Source collection (resource locator)
  • Top K: Number of documents to return
  • Search Parameters: Advanced retrieval options

Create Collection

Create a new collection with a specified metric type:

  • Collection Name: Name of the collection to create
  • Metric Type: Choose from L2, IP, Cosine, Hamming, or Jaccard
  • Vector Dimension: Dimension of vector fields
  • Description: Optional collection description

Insert Vectors

Insert vectors into a collection:

  • Collection Name: Target collection
  • Data: JSON array of data objects to insert

Search Vectors

Search for similar vectors with configurable metric types:

  • Collection Name: Collection to search in
  • Metric Type: Similarity metric (L2, IP, Cosine, Hamming, Jaccard)
  • Vectors: Query vectors as JSON array
  • Top K: Number of results to return
  • Search Parameters: Advanced search parameters
  • Output Fields: Fields to include in results
  • Filter Expression: Boolean filter expression

Query Vectors

Query vectors by filter expressions:

  • Collection Name: Target collection
  • Filter Expression: Boolean expression for filtering
  • Output Fields: Fields to include in results

Delete Vectors

Delete vectors based on filter expressions:

  • Collection Name: Target collection
  • Filter Expression: Boolean expression for deletion criteria

List Collections

List all available collections in the database.

Supported Metric Types

| Metric Type | Description | Use Case | |-------------|-------------|----------| | L2 | Euclidean distance | General purpose, normalized vectors | | IP | Inner Product | Cosine similarity for normalized vectors | | Cosine | Cosine similarity | Text embeddings, semantic search | | Hamming | Hamming distance | Binary vectors, fingerprints | | Jaccard | Jaccard distance | Set similarity, sparse vectors |

Example Workflows

AI Tool with Embeddings Integration

{
  "nodes": [
    {
      "parameters": {
        "model": "text-embedding-3-large",
        "options": {
          "dimensions": 3072
        }
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1.2,
      "position": [784, 624],
      "id": "embeddings",
      "name": "Embeddings OpenAI"
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "repository source",
        "milvusCollection": {
          "__rl": true,
          "value": "gitlab_stemx_source",
          "mode": "name"
        },
        "topK": 10,
        "searchMetricType": "COSINE"
      },
      "type": "n8n-nodes-milvus-enhanced.milvusEnhanced",
      "typeVersion": 1,
      "position": [864, 384],
      "id": "milvus-enhanced",
      "name": "Milvus Enhanced",
      "credentials": {
        "milvusNew": {
          "id": "your-milvus-new-credential-id",
          "name": "Milvus New account"
        }
      }
    },
    {
      "parameters": {
        "authentication": "headerAuth",
        "path": "webhook-path"
      },
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "typeVersion": 2,
      "position": [816, 32],
      "id": "mcp-trigger",
      "name": "MCP Server Trigger"
    }
  ],
  "connections": {
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Milvus Enhanced",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Milvus Enhanced": {
      "ai_tool": [
        [
          {
            "node": "MCP Server Trigger",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}

Insert Documents

{
  "parameters": {
    "mode": "insert",
    "milvusCollection": {
      "__rl": true,
      "value": "my_collection",
      "mode": "list"
    },
    "data": [
      {
        "id": 1,
        "vector": [0.1, 0.2, 0.3],
        "text": "Sample document"
      }
    ]
  }
}

Create Collection with Custom Metric

{
  "parameters": {
    "operation": "createCollection",
    "collection": "embeddings_collection",
    "metricType": "COSINE",
    "dimension": 768,
    "description": "Text embeddings with cosine similarity"
  }
}

Development

Prerequisites

  • Node.js 18+
  • n8n development environment

Local Development

# Clone repository
git clone https://gitlab.com/interticket/it-stemx/ai-source/milvus-n8n-node.git
cd milvus-n8n-node

# Install dependencies
npm install

# Build
npm run build

# Lint
npm run lint

Project Structure

├── credentials/
│   └── MilvusApi.credentials.ts    # Credential configuration
├── nodes/
│   └── MilvusEnhanced/
│       ├── MilvusEnhanced.node.ts  # Main node implementation
│       └── milvus.svg              # Node icon
├── dist/                           # Compiled output
├── package.json                    # Package configuration
└── README.md                       # Documentation

Requirements

  • n8n version 1.0.0 or higher
  • Milvus server 2.3.0 or higher

License

MIT License - see LICENSE file for details.

Support

For issues, questions, or contributions:

  • Create an issue in the GitLab repository
  • Check n8n community forums for general n8n questions

Changelog

1.0.0

  • Initial release
  • Support for all major Milvus operations
  • Enhanced metric type switching
  • Complete CRUD functionality