Releases: milvus-io/pymilvus
Releases · milvus-io/pymilvus
PyMilvus 2.3.0 Release Notes
What's Changed
- Add the
load_state
api by @SimFG in #1258 - add resource group api by @weiliu1031 in #1274
- Support rename collection API by @jaime0815 in #1299
- Support upsert by @smellthemoon in #1303
- Add ignore_growing option for query and search by @aoiasd in #1286
- Add GPU index types by @cydrain in #1314
- Add RAFT GPU index types by @cydrain in #1323
- Add FlushAll api by @bigsheeper in #1334
- Add new metric type COSINE by @cydrain in #1376
- Add an utility to get server type by @longjiquan in #1381
- List indexes by field name by @longjiquan in #1386
- Remove default of shards_num for new collection by @XuanYang-cn in #1387
- Milvus Client by @filip-halt in #1374
- Support insert dict as JSON by @yah01 in #1424
- Support Partition key by @xige-16 in #1427
- support iterator for query and search by @MrPresent-Han in #1431
- Add support of insert by rows by @czs007 in #1434
- Support api key by @bigsheeper in #1460
- Call Connect after db name changed by @longjiquan in #1484
- Pass the is_dynamic field to the milvus server by @xiaocai2333 in #1495
- Support return pending index rows when describe index by @xiaocai2333 in #1504
- Do not set metric_type default value in search params (#1469) by @bigsheeper in #1511
- Support async refresh by @yah01 in #1537
- Change pylint to ruff and black by @XuanYang-cn in #1565
- add autoID to varchar dataType by @smellthemoon in #1583
- Support offset in search param by @XuanYang-cn in #1613
- Remove time travel params by @jiaoew1991 in #1635
- Disable logger from polluting other modules by @ponponon in #1646
New Contributors
- @liliu-z made their first contribution in #1223
- @smellthemoon made their first contribution in #1303
- @leykun10 made their first contribution in #1338
- @MrPresent-Han made their first contribution in #1431
- @pingliu made their first contribution in #1520
- @im-ajaymeena made their first contribution in #1517
- @shunjiezhao made their first contribution in #1551
- @slobentanzer made their first contribution in #1649
- @jyc4617 made their first contribution in #1638
- @ponponon made their first contribution in #1646
Full Changelog: v2.2.15...v2.3.0
PyMilvus 2.2.15 Release Notes
- Fixed some bugs.
- Enable to set offet&limit in search params.
PyMilvus 2.2.14 Release Notes
- Support rename db for collection
- Support describe index with timestamp
- Update bulkinsert examples
- Fix some bugs
PyMilvus 2.2.13 Release Notes
Fix apache software license classifier (#1563) Signed-off-by: zhenshan.cao <[email protected]>
PyMilvus 2.2.12 Release Notes
Fixing the encoding issue
By setting the "ensure_ascii=False" parameter in the "json.dumps" function, non-ASCII characters in the data are not escaped during the "insert" operation.
After inserting non-ASCII characters without escaping, users can also use them as keys in expression filtering from the JSON field.
The following is a sample code snippet.
import numpy as np
from pymilvus import MilvusClient, DataType
dimension = 128
collection_name = "books"
client = MilvusClient("http://localhost:19530")
schema = client.create_schema(auto_id=True)
schema.add_field("id", DataType.INT64, is_primary=True)
schema.add_field("embeddings", DataType.FLOAT_VECTOR, dim=dimension)
schema.add_field("info", DataType.JSON)
index_param = client.prepare_index_params("embeddings", metric_type="L2")
client.create_collection_with_schema(collection_name, schema, index_param)
rng = np.random.default_rng(seed=19530)
rows = [
{"embeddings": rng.random((1, dimension))[0],
"info": {"title": "Lord of the Flies", "author": "William Golding"}},
{"embeddings": rng.random((1, dimension))[0],
"info": {"作者": "J.D.塞林格", "title": "麦田里的守望者", }},
{"embeddings": rng.random((1, dimension))[0],
"info": {"Título": "Cien años de soledad", "autor": "Gabriel García Márquez"}},
]
client.insert(collection_name, rows)
result = client.query(collection_name, filter="info['作者'] == 'J.D.塞林格' or info['Título'] == 'Cien años de soledad'",
output_fields=["info"],
consistency_level="Strong")
for hit in result:
print(f"hit: {hit}")
The output will be:
hit: {'info': {'作者': 'J.D.塞林格', 'title': '麦田里的守望者'}, 'id': 442210659570062545}
hit: {'info': {'Título': 'Cien años de soledad', 'autor': 'Gabriel García Márquez'}, 'id': 442210659570062546}
PyMilvus 2.2.11 Release Notes
Add milvus_client
PyMilvus 2.2.9 Release Notes
- JSON support
- Dynamic schema
- Partition key
- Connection management
PyMilvus 2.2.8 Release Notes
New Features
>>> utility.get_server_type(using="default")
"milvus"
- List indexes by field name #1386
>>> utility.list_indexes(collection_name, field_name=vec_field)
[vec_field_idx]
- [FEATURE]: Remove the logic to fill in the default number of shard when create collection
PyMilvus doesn't set default shard numbers when creating a new collection. - [FEATURE]: PyMilvus supports using env configs
- Support uri with username and password:
from pymilvus import connections
uri = "https://username:[email protected]:19530"
connections.connect(uri=uri)
- Support using MIVLUS_URI env to init default connection alias.
// set MILVUS_URI in env
$ export MILVUS_URI=https://username:[email protected]:19530
>>> from pymilvus import connections
>>> connections.connect()
>>> connections.get_connection_addr("default")
{"address": "exampledomain.com:19530", "user": username}
- Support reading envs from .env file
# .env.example in https://github.com/milvus-io/pymilvus/blob/master/.env.example
# Please copy this file and rename as .env, pymilvus will read .env file if provided
MILVUS_URI=
# MILVUS_URI=https://username:[email protected]:19530
# Milvus connections configs
MILVUS_CONN_ALIAS=default
MILVUS_CONN_TIMEOUT=10
Bug fixes
PyMilvus 2.2.7 Release Notes
Fix some bugs
PyMilvus 2.2.6 Release Notes
Fix some bugs