github milvus-io/milvus client/v2.6.2

12 hours ago

Release Notes - Milvus Go SDK v2.6.2

Summary

This release introduces QueryIterator support for efficient large result set iteration and adds Struct Array field type support in the Go SDK.

New Features

QueryIterator Support

Added QueryIterator for efficiently iterating over large query result sets using PK-based pagination (#46633).

  • Support for Int64 and VarChar primary key types for automatic pagination
  • Configurable options via QueryIteratorOption:
    • WithBatchSize(int) - Set batch size for each iteration (default: 1000)
    • WithIteratorLimit(int64) - Set overall limit of entries to iterate
    • WithFilter(string) - Set filter expression
    • WithOutputFields(...string) - Specify output fields
    • WithPartitions(...string) - Specify partition names
    • WithConsistencyLevel(ConsistencyLevel) - Set consistency level

Usage Example:

  opt := milvusclient.NewQueryIteratorOption("collection_name").
      WithBatchSize(500).
      WithFilter("age > 18").
      WithOutputFields("id", "name", "vector")

  iter, err := client.QueryIterator(ctx, opt)
  for {
      rs, err := iter.Next(ctx)
      if errors.Is(err, io.EOF) {
          break
      }
      // process rs...
  }

Enhancements

Struct Array Field Type Support (#45291)

Added support for Struct Array field type in Go SDK:

  • New columnStructArray type implementing the Column interface
  • Support for parsing StructArrayField from protobuf responses
  • Schema construction support for struct array fields via entity.FieldTypeArray

Test Infrastructure Improvements (#45113)

  • Refactored go_client test wrapper to use struct embedding pattern
  • Improved test structure and organization

Related PRs

  • #45113 - Refactor go_client test wrapper
  • #45291 - Support struct array field type
  • #46633 - Add QueryIterator support

Don't miss a new milvus release

NewReleases is sending notifications on new releases.