Pymilvus

Latest version: v2.4.1

Safety actively analyzes 626118 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 9

2.2.16

What's Changed
* Fix lint error by yhmo in https://github.com/milvus-io/pymilvus/pull/1668
* while parse uri, overwrite the db_name with default by PowderLi in https://github.com/milvus-io/pymilvus/pull/1683
* Update grpcio version range by XuanYang-cn in https://github.com/milvus-io/pymilvus/pull/1693
* Update 2.2.x readme by XuanYang-cn in https://github.com/milvus-io/pymilvus/pull/1700

Features
* Bulkinsert writer by yhmo in https://github.com/milvus-io/pymilvus/pull/1664

**Full Changelog**: https://github.com/milvus-io/pymilvus/compare/v2.2.15...v2.2.16

2.2.15

1. Fixed some bugs.
2. Enable to set offet&limit in search params.

2.2.14

1. Support rename db for collection
2. Support describe index with timestamp
3. Update bulkinsert examples
4. Fix some bugs

2.2.13

2.2.12

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.

python
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}

2.2.11

Add milvus_client

Page 3 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.