Milvus Vector Store

Query Milvus vector database using HTTP API as AI tool

Milvus Vector Store

AI-generated

Overview

This node acts as an AI tool to query a Milvus vector database collection via its HTTP API. It is designed to retrieve relevant documents based on a text search query, optionally filtered by custom expressions or service names. The node is useful in scenarios where you want to perform semantic or vector-based searches over large document collections stored in Milvus, such as knowledge bases, document repositories, or AI agent integrations that require contextual data retrieval.

Typical use cases include:

  • Integrating with AI agents to fetch contextually relevant documents for question answering.
  • Searching vectorized document stores for similarity matches.
  • Filtering and retrieving specific subsets of documents from a Milvus collection based on metadata or content fields.

Properties

Name Meaning
Collection Name The name of the Milvus collection to query.
Tool Description A description of what this tool does, used to inform the AI agent about its purpose.
Default Limit The default number of results to return (between 1 and 100).
Output Fields Comma-separated list of fields to return from the query results. Use * to return all fields.
Search Field The field within the documents to search when no specific filter is provided (default: "text").

Output

The node outputs JSON data structured as follows:

  • success: Boolean indicating if the query was successful.
  • documents: An array of document objects returned from the Milvus collection matching the query and filters.
  • metadata: Contains details about the query execution including:
    • query: The original search query string.
    • filter: The filter expression applied.
    • collection: The collection name queried.
    • count: Number of documents returned.
    • limit: The limit on the number of results.
    • searchType: Fixed value "http_query".
    • outputFields: List of fields requested in the output.
  • raw_response: The raw HTTP response from the Milvus API, including status code, data, and headers.

The node does not output binary data.

Dependencies

  • Requires access to a Milvus vector database HTTP API endpoint.
  • Needs credentials containing at least a base URL, username, and password for authentication against the Milvus API.
  • The node expects these credentials to be configured in n8n prior to use.

Troubleshooting

  • Common issues:
    • Incorrect or missing credentials will cause authentication failures.
    • Invalid collection names or filters may result in empty results or errors.
    • Network timeouts or unreachable Milvus endpoints can cause request failures.
  • Error messages:
    • Errors during querying are thrown with messages like:
      Failed to query Milvus collection "<collectionName>": <error message> (Status: <statusCode>) - Response: <response body>
    • To resolve, verify credentials, collection existence, filter syntax, and network connectivity.

Links and References

Discussion