Skip to content

Release v2.6.0

Latest
Compare
Choose a tag to compare
@shanghaikid shanghaikid released this 15 Jul 06:30
· 1 commit to main since this release
957054d

Milvus Node.js SDK v2.6.0 Release Notes

Release Date: July 15, 2025

Overview

The Milvus Node.js SDK v2.6.0 officially supports all new features in Milvus 2.6.0, including enhanced JSON handling, text embedding functions, schema evolution, and new vector types.

Compatibility

  • Milvus Version: 2.6.0
  • Node.js Version: 14.x or later

New Features

🚀 JSON Path Index Support

  • Create inverted indexes on specific JSON paths (e.g., meta.user.location)
  • Accelerate filtering on nested JSON fields without full document scans
await milvusClient.createIndex({
      index_name: 'json',
      collection_name: COLLECTION_NAME,
      field_name: 'json',
      index_type: IndexType.INVERTED,
      params: {
        json_path: `json[\"static\"][\"string_key\"]`,
        json_cast_type: 'varchar',
      },
    });

🎯 INT8 Vector Support

  • Native support for 8-bit integer vectors
  • Direct ingestion of quantized embeddings (no de-quantization needed)
  • Reduces storage and improves performance

✨ Text Embedding Functions

  • Automatic text-to-vector conversion
  • Integration with OpenAI, AWS Bedrock, Google Vertex AI, and Hugging Face
  • "Data-in, data-out" simplicity for AI applications
const params = {
  collection_name: "my-collection",
  fields: [
    {
      name: "text",
      description: "text field",
      data_type: DataType.VarChar,
      max_length: 20,
      is_partition_key: false,
      enable_analyzer: true,
    },
    {
      name: "dense",
      description: "dense field",
      dim: 1536,
      data_type: DataType.FloatVector,
      is_function_output: true,
    },
  ],
  functions: [
    {
      name: "openai",
      description: "openai text embedding function",
      type: FunctionType.TEXTEMBEDDING,
      input_field_names: ["text"],
      output_field_names: ["dense"],
      params: {
       "provider": "openai",                 // Embedding model provider
        "model_name": "text-embedding-3-small",     // Embedding model
        // "credential": "apikey1",            // Optional: Credential label
        // Optional parameters:
        // "dim": "1536",       // Optionally shorten the vector dimension
       //  "user": "user123"    // Optional: identifier for API tracking
      },
    },
  ],
};

await client.createCollection(params);

🔄 Schema Evolution

  • Add new scalar/vector fields to existing collections
  • New addCollectionFields method
await milvusClient.addCollectionField({
  collection_name: COLLECTION_NAME,
  field: {
    name: 'new_varChar',
    description: 'new VarChar field',
    data_type: DataType.VarChar,
    max_length: 128,
    is_partition_key: false,
    nullable: true, // required to be set true
    default_value: 'default',
  }
});


await milvusClient.addCollectionFields({
  collection_name: COLLECTION_NAME,
  fields: fieldsToAdd, // array of fields
});

📝 Analyzer/Tokenizer Enhancements

  • runAnalyzer method for tokenizer validation
  • Row-level tokenizer selection
  • Improved multilingual text processing
const runAnalyzer = await milvusClient.runAnalyzer({
  analyzer_params: {
    tokenizer: 'standard',
    filter: ['lowercase'],
  },
  text: 'Would you like to eat an apple?',
  with_detail: true,
  with_hash: true,
});

Improvements

  • Proto-json support for better protocol buffer handling
  • Downgraded @grpc/grpc-js to 1.7.3 for stability
  • Internal optimizations and bug fixes

Upgrade Instructions

⚠️ Requires Milvus 2.6.0 server

npm install @milvus-io/[email protected]