Releases: milvus-io/pymilvus
PyMilvus v2.6.3 Release Notes
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
What's Changed
- fix: Refine partial upsert to preserve unspecified fields (#2955) by @weiliu1031 in #2970
- fix: Correct validation logic for partial upsert requests (#2974) by @weiliu1031 in #2977
- feat: support group by json field(#2884) by @MrPresent-Han in #2980
- enhance: [2.6]Run actions when push to repo to enable cov compare by @XuanYang-cn in #2969
- support connectType if use oss-bucket by @lentitude2tk in #2988
- enhance: Sync PyMilvus milvus-proto commit to v2.6.2 by @XuanYang-cn in #2995
Full Changelog: v2.6.1...v2.6.2
PyMilvus v2.5.16 Release Notes
What's Changed
- support geo data type for insert,query and search for pymilvus 2.5 by @Yinwei-Yu in #2943
- fix: [25]Fix the existing version fmt by @XuanYang-cn in #2959
- fix: [2.5]Passing unknown req.is_refresh to wait by @XuanYang-cn in #2965
- [cherry-pick] support connectType if use oss-bucket by @lentitude2tk in #2989
- [cherry-pick] bulk_import add apiKey note by @lentitude2tk in #2998
Full Changelog: v2.5.15...v2.5.16
PyMilvus v2.6.1 Release Notes
What's Changed
- Avoid describe_collection when query by ids by @yhmo in #2930
- bulkImport add objectUrls/token paramster & add example use by @lentitude2tk in #2934
- support stageManager & stageFileManager by @lentitude2tk in #2935
- fix: Fix the existing version fmt by @XuanYang-cn in #2960
- enhance: Add unixmsec in every RPC call by @XuanYang-cn in #2961
- enhance: Multiple cherry picks from master branch by @XuanYang-cn in #2962
- fix: Passing unknown req.is_refresh to wait by @XuanYang-cn in #2964
Full Changelog: v2.6.0...v2.6.1
PyMilvus v2.5.15 Release Notes
What's Changed
- Compatible with the default behavior of free on the cloud by @lentitude2tk in #2912
- fix: Return new pk value for upsert when autoid=true by @yhmo in #2915
- fix: Multiple cherry-picks from master by @XuanYang-cn in #2906
- bulkImport add objectUrls/token paramster & add example use by @lentitude2tk in #2932
- support stageManager & stageFileManager by @lentitude2tk in #2920
Full Changelog: v2.5.14...v2.5.15
PyMilvus v2.6.0 Release Notes
New Features
- 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
- Add AsyncMilvusClient
- [FEAT] Asyncio support by @brcarry in #2411
- Add async DDL funcs & DDL examples by @Shawnzheng011019 in #2852
- Other features
- enhance: support Int8Vector by @cydrain in #2611
- feat: support recalls field in SearchResult by @chasingegg in #2390
- enhance: Support Python3.13 and upgrade grpcio range by @XuanYang-cn in #2684
- enhance: support run analyzer return detail token by @aoiasd in #2679
- enhance: Add force_drop parameter to drop_role method for role deletion by @SimFG in #2705
- enhance: add property func for AnalyzeToken by @aoiasd in #2704
- enhance: grant/revoke v2 optional db and collection params by @shaoting-huang in #2386
- extend unlimted offset for query iterator(#2418) by @MrPresent-Han in #2419
- enhance: alterindex & altercollection supports altering properties by @JsDove in #2406
- enhance: alterdatabase support delete property by @JsDove in #2435
- enhance: support hints param by @chasingegg in #2408
- enhance: create database support properties by @JsDove in #2448
- enhance: Add
db_nameparameter atbulk_importby @counter2015 in #2446 - enhance: add search iterator v2 by @PwzXxm in #2395
- enhance: simplify the structure of search_params by @smellthemoon in #2507
- enhance: Remove long deprecated Milvus class by @XuanYang-cn in #2544
- enhance: Use new model pkg by @junjiejiangjjj in #2595
- enhance: Add schema update time verification to insert and upsert to use cache by @JsDove in #2551
- enhance: describecollection output add created_timestamp by @JsDove in #2618
- feat: add external filter func for search iterator v2 by @PwzXxm in #2639
- enhance: support run analyzer by @aoiasd in #2622
- weighted reranker to allow skip score normalization by @zhengbuqian in #2708
- enhance: Support AddCollectionField API by @congqixia in #2722
- Add 1-Way and 2-Way TLS Support to Bulk Import Functions by @abd-770 in #2672
- enhance: Use SearchResult in MilvusClient by @XuanYang-cn in #2735
- Support rerank by @junjiejiangjjj in #2729
- feat: suppoprt multi analyzer params by @aoiasd in #2747
- Add funciton checker by @junjiejiangjjj in #2760
- enhance: Support run analyzer by collection and field by @aoiasd in #2822
- feat: support load collection/partition with priority(#2835) by @MrPresent-Han in #2836
- enhance: optimize perf for large topk(#2848) by @MrPresent-Han in #2849
- enhance: Add usage guide to manage MilvusClient by @XuanYang-cn in #2907
New Contributors
- @jiangyinzuo made their first contribution in #2387
- @zjjzyl made their first contribution in #2417
- @Abhijnan-Bajpai made their first contribution in #2520
- @counter2015 made their first contribution in #2446
- @mihailyanchev made their first contribution in #2678
- @proost made their first contribution in #2725
- @abd-770 made their first contribution in #2672
- @jperez999 made their first contribution in #2716
- @foxspy made their first contribution in #2772
- @michaelkl made their first contribution in #2806
- @Shawnzheng011019 made their first contribution in #2852
- @tedxu made their first contribution in #2873
Full Changelog: v2.5.0...v2.6.0
PyMilvus 2.5.14 Release Notes
What's Changed
- fix: Aviod coping functions when init CollectionSchema by @XuanYang-cn in #2903
Full Changelog: v2.5.13...v2.5.14
PyMilvus 2.5.13 Release Notes
What's Changed
- fix: Fix hybrid search params check by @xiaocai2333 in #2890
- fix: [25]Concurrent init MilvusClient don't reuse connections by @XuanYang-cn in #2897
- fix: [25]Tidy alias configs when connect fails by @XuanYang-cn in #2899
Full Changelog: v2.5.12...v2.5.13
PyMilvus 2.5.12 Release Notes
What's Changed
- fix: [2.5]add retry in compact for compatibility with old Milvus server in order to reduce describecollection by @JsDove in #2842
- enhance: optimize perf for search&&query under large topk(#2848) by @MrPresent-Han in #2855
- fix: remove validation for collection_id in manual_compaction method by @JsDove in #2857
- fix: update manual_compaction method parameter by @JsDove in #2859
- enhance: [25]fix according to the latest ruff by @XuanYang-cn in #2861
- fix: hybridExtraList miss iter method and dynamic fields value overrite fixed field value(#2848) by @MrPresent-Han in #2866
- enhance: make query result mutable for only one time modification(#2848) by @MrPresent-Han in #2871
- enhance: Cherry pick multiple prs by @XuanYang-cn in #2882
Full Changelog: v2.5.11...V2.5.12
PyMilvus 2.5.11 Release Notes
What's Changed
- fix:[2.5] wrong marshal field schema prarams case alter collection failed by @aoiasd in #2811
- Add bulkinsert example for parquet file by @yhmo in #2813
- fix: [2.5] Pass correct number of params of _prepare_row_upsert_request by @congqixia in #2819
- enhance: Multiple Cherry picks from master by @XuanYang-cn in #2808
- fix: [cp25]MilvusClient misusage of disconnect by @XuanYang-cn in #2817
- enhance: [2.5] Support run analyzer by collection and field by @aoiasd in #2821
- fix: await on remove async connections by @XuanYang-cn in #2829
- fix: [cp25]remove calling of deregister_state_change_callback by @XuanYang-cn in #2834
- enahnce:[2.5] dump analyzer params when init field schema by @aoiasd in #2845
Full Changelog: v2.5.10...v2.5.11