Skip to content

Releases: milvus-io/pymilvus

PyMilvus v2.6.5 Release Notes

05 Dec 08:59
1766729

Choose a tag to compare

PyMilvus 2.6.5 Release Notes

Enhancements

1. Added comprehensive features to AsyncMilvusClient including: (#3108)

2. Enhanced error messages when AsyncMilvusClient fails to connect. (#3102)

Bug Fixes

  1. fix: AsyncMilvusClient.search supports EmbeddingList (#3101)
  2. fix: AsyncMilvusClient.create_index supports nested fields (#3100)
  3. fix: Use deepcopy for struct_schema in add_field (#3105)
  4. fix: Error when function or function_score fetch empty params (#3119)

What's Changed

New Contributors

Full Changelog: v2.6.4...v2.6.5

PyMilvus v2.5.18 Release Notes

02 Dec 10:57
613c3f8

Choose a tag to compare

What's Changed

Full Changelog: v2.5.17...v2.5.18

PyMilvus v2.6.4 Release Notes

26 Nov 08:29
a016cff

Choose a tag to compare

Highlights

1. Support for TimestampTZ Data Type (Introduced in Milvus v2.6.6)

PyMilvus now supports the TIMESTAMPTZ data type, allowing you to store and query timestamps with time zone information.

from pymilvus import MilvusClient, DataType

client = MilvusClient(uri="http://localhost:19530")

# 1. Define Schema with TimestampTZ
schema = MilvusClient.create_schema()
schema.add_field("id", DataType.INT64, is_primary=True)
schema.add_field("timestamp", DataType.TIMESTAMPTZ)
schema.add_field("vector", DataType.FLOAT_VECTOR, dim=128)

client.create_collection(collection_name="ts_collection", schema=schema)

# 2. Insert Data (using ISO 8601 format strings with timezone)
data = [
    {"id": 1, "timestamp": "2025-01-01T12:00:00+00:00", "vector": [0.1] * 128},
    {"id": 2, "timestamp": "2025-01-02T08:30:00-05:00", "vector": [0.2] * 128}
]
client.insert(collection_name="ts_collection", data=data)

# 3. Query Data
# Query records by ID to retrieve timestamps
res = client.query(
    collection_name="ts_collection",
    filter="id in [1, 2]",
    output_fields=["id", "timestamp"]
)
print(res)

Change Log

Features & Enhancements

  • [TimestampTZ] Added support for TIMESTAMPTZ data type. (#3092)
  • [BulkWriter] Supported STRUCT field data type in BulkWriter. (#3068)
  • [BulkWriter] Supported Geometry data type in BulkWriter. (#3052)
  • [BulkWriter] Added support for specifying a local temporary path in RemoteBulkWriter. (#3077)
  • [STRUCT] Supported TypeParams definition in STRUCT fields. (#3055)
  • [MilvusClient] Migrated 6 APIs to MilvusClient: flush_all, get_flush_all_state, list_loaded_segments, list_persistent_segments, get_server_type, and get_compaction_plans. (#3096)
  • [Array] Supported numpy ndarray input for ARRAY fields in MilvusClient. (#3096)

Bug Fixes

  • [Import] Added db_name parameter to list_import_jobs() to correctly list jobs under a specific database. (#3088)
  • [Connection] Fixed a bug related to connection reset handling. (#3085)
  • [Connection] Fixed an issue with connection caching when retrieving collection schema. (#3072)
  • [STRUCT] Fixed a bug where querying STRUCT fields could incorrectly return an empty array. (#3074)
  • [MilvusClient] Fixed an issue where insert() did not pass **kwargs (e.g., timeout) to the underlying implementation. (#3096)
  • [Async] Fixed connection reuse issue by including event loop ID in connection alias. (#3096)
  • [Async] Fixed async flush() not waiting for segments to be flushed. (#3090)
  • [MilvusClient] Fixed key names in segment info retrieval. (#3096)
  • [Error Handling] Added detailed traceback to error handler for better debugging. (#3096)

Full Changelog: v2.6.3...v2.6.4

PyMilvus v2.5.17 Release Notes

10 Nov 03:24
87b9e55

Choose a tag to compare

What's Changed

Full Changelog: v2.5.16...v2.5.17

PyMilvus v2.6.3 Release Notes

31 Oct 06:25
9b0f35d

Choose a tag to compare

Highlights

1. Support for Array of Structs

PyMilvus now supports array of structs data types, allowing you to store and query complex nested data structures.

from pymilvus import MilvusClient, DataType

client = MilvusClient(uri="http://localhost:19530")

schema = client.create_schema(auto_id=False)
schema.add_field(field_name="id", datatype=DataType.INT64, is_primary=True)
schema.add_field(field_name="vector", datatype=DataType.FLOAT_VECTOR, dim=128)

struct_schema = MilvusClient.create_struct_field_schema()
struct_schema.add_field(field_name="name", datatype=DataType.VARCHAR, max_length=100)
struct_schema.add_field(field_name="age", datatype=DataType.INT64)
struct_schema.add_field(field_name="text", datatype=DataType.VARCHAR, max_length=65535)
struct_schema.add_field(field_name="emb", datatype=DataType.FLOAT_VECTOR, dim=128)
schema.add_field(
    field_name="user_info",
    datatype=DataType.ARRAY,
    element_type=DataType.STRUCT,
    struct_schema=struct_schema,
    max_capacity=1000,
)

client.create_collection(collection_name="users", schema=schema)

data = {
    "id": 1,
    "user_info": [
        {"name": "Alice", "age": 30, "text": "this is alice", "emb": [0.1] * 128},
        {"name": "Bob", "age": 20, "text": "this is bob", "emb": [0.2] * 128},
    ]
    "vector": [0.1] * 128
}

client.insert(collection_name="users", data=[data])

📖 Documentation Array of Structs, Compatible with Milvus 2.6.4+

2. Geometry Data Type Support

Query and search with geographic data using the new Geometry data type.

from pymilvus import MilvusClient, DataType

client = MilvusClient(uri="http://localhost:19530")

schema = MilvusClient.create_schema()
schema.add_field(field_name="id", datatype=DataType.INT64, is_primary=True)
schema.add_field(field_name="location", datatype=DataType.GEOMETRY, nullable=True)
schema.add_field(field_name="vector", datatype=DataType.FLOAT_VECTOR, dim=128)

client.create_collection(collection_name="geo_coll", schema=schema)

data = [
    {"id": 1, "location": "POINT(116.404 39.915)", "vector": [0.1] * 128},
    {"id": 2, "location": "POINT(-73.935 40.730)", "vector": [0.2] * 128}
]
client.insert(collection_name="locations", data=data)

results = client.query(
    collection_name="locations",
    filter=f'st_dwithin(location, "POINT(116.4 39.9)", 1000.0)',
    output_fields=["id", "location"]
)

📖 Documentation Geometry field, Compatible with Milvus 2.6.4+

3. Insert Primary Key with Auto ID Enabled

You can now insert custom primary keys even when auto_id is enabled, providing more flexibility in data management.

from pymilvus import MilvusClient, DataType

client = MilvusClient(uri="http://localhost:19530")

schema = MilvusClient.create_schema(auto_id=True)
schema.add_field(field_name="id", datatype=DataType.INT64, is_primary=True, auto_id=True)
schema.add_field(field_name="vector", datatype=DataType.FLOAT_VECTOR, dim=128)

client.create_collection(collection_name="my_collection", schema=schema, properties={"allow_insert_auto_id": "true"})

data = [
    {"id": 100, "vector": [0.1] * 128},
    {"id": 200, "vector": [0.2] * 128}
]
client.insert(collection_name="my_collection", data=data)

📖 Documentation Insert when AutoID is true, Compatible with Milvus 2.6.3+

4. L0 Compaction Support

Trigger L0 compaction manually to optimize storage and query performance.

from pymilvus import MilvusClient

client = MilvusClient(uri="http://localhost:19530")

client.compact(collection_name="my_collection", is_l0=True)

📖 Documentation Compact L0 segments, Compatible with Milvus 2.6.3+

5. ⚠️ Breaking Change: JSON Serialization for Strings

String values are now treated as JSON-serialized bytes. This is incompatible with previous versions.

Before (2.6.2 and earlier):

client.insert(collection_name="my_collection", data=[{"id": 1, "json_field": "a"}])

Now (2.6.3+):

import json

client.insert(collection_name="my_collection", data=[{"id": 1, "json_field": json.dumps("a")}])

Complete Change Log

Features

  • Struct Support: SDK implementation for struct data type with field-level mmap configuration (#3026, #3037)
  • Geo Data Type: Support for geographic data in insert, query, and search operations (#3043)
  • L0 Compaction: Force L0 compact support (#3011)
  • Function Scorer Ranker: Support using function scorer as ranker (#3010)
  • Replicate Configuration: UpdateReplicateConfiguration API support (#3003)

Enhancements

  • Async Client Improvements: Added retry mechanism and schema cache for AsyncMilvusClient (#3023)
  • Allow user to insert primary key when auto_id is enabled (#3007)
  • Update get_cost_from_status implementation (#3000)
  • Enhanced remote storage usage result info (#3014)
  • Remove annoying logs in MilvusClient (#3016)
  • Raise error when ranker has unknown type (#3021)
  • Support insert serialized JSON (#3031)
  • Cherry pick multiple PRs from master branch (#3048)

Bug Fixes

  • Fix hybrid_search to support EmbeddingList in request data (#3028)

Documentation

  • Add apiKey note for bulk_import (#2997)

Contributors

Special thanks to all contributors who made this release possible:
@SpadeA-Tang, @XuanYang-cn, @aoiasd, @bigsheeper, @chasingegg, @lentitude2tk, @MrPresent-Han, @sunby, @xiaocai2333, @zhuwenxing


For more information, visit the PyMilvus GitHub repository.
Full Changelog: v2.6.2...v2.6.3

PyMilvus v2.6.2 Release Notes

18 Sep 12:27
e9fbd2d

Choose a tag to compare

What's Changed

Full Changelog: v2.6.1...v2.6.2

PyMilvus v2.5.16 Release Notes

19 Sep 06:58
cbac2f3

Choose a tag to compare

What's Changed

Full Changelog: v2.5.15...v2.5.16

PyMilvus v2.6.1 Release Notes

29 Aug 10:03
0237c9f

Choose a tag to compare

What's Changed

Full Changelog: v2.6.0...v2.6.1

PyMilvus v2.5.15 Release Notes

21 Aug 11:30
ac5baf9

Choose a tag to compare

What's Changed

Full Changelog: v2.5.14...v2.5.15

PyMilvus v2.6.0 Release Notes

06 Aug 09:08
1e56ce7

Choose a tag to compare

New Features

  1. Add APIs in MilvusClient
  • enhance: add describe and alter database in MilvusClient by @smellthemoon in #2433
  • enhance: support milvus-client iterator by @MrPresent-Han in #2461
  • enhance: Enable resource group api in milvus client by @weiliu1031 in #2513
  • enhance: add release_collection, drop_index, create_partition, drop_partition, load_partition and release_partition by @brcarry in #2525
  • enhance: enable describe_replica api in milvus client by @weiliu1031 in #2541
  • enhance: support recalls for milvus_client by @chasingegg in #2552
  • enhance: add use_database by @czs007 in #2491
  1. Add AsyncMilvusClient
  1. Other features

New Contributors

Full Changelog: v2.5.0...v2.6.0