Skip to content

Releases: milvus-io/pymilvus

PyMilvus 2.3.2 Release Notes

26 Oct 09:34
693217b
Compare
Choose a tag to compare

New Features

What's Changed

New Contributors

Full Changelog: v2.3.1...v2.3.2

PyMilvus 2.3.1 Release Notes

22 Sep 11:21
5a685eb
Compare
Choose a tag to compare

What's Changed

New Features

Full Changelog: v2.3.0...v2.3.1

PyMilvus 2.2.16 Release Notes

15 Sep 10:02
1574a52
Compare
Choose a tag to compare

What's Changed

Features

Full Changelog: v2.2.15...v2.2.16

PyMilvus 2.3.0 Release Notes

23 Aug 14:27
ea9328d
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.2.15...v2.3.0

PyMilvus 2.2.15 Release Notes

09 Aug 07:25
6e21893
Compare
Choose a tag to compare
  1. Fixed some bugs.
  2. Enable to set offet&limit in search params.

PyMilvus 2.2.14 Release Notes

24 Jul 13:27
c28ceb1
Compare
Choose a tag to compare
  1. Support rename db for collection
  2. Support describe index with timestamp
  3. Update bulkinsert examples
  4. Fix some bugs

PyMilvus 2.2.13 Release Notes

28 Jun 12:25
8d6087e
Compare
Choose a tag to compare
Fix apache software license classifier (#1563)

Signed-off-by: zhenshan.cao <[email protected]>

PyMilvus 2.2.12 Release Notes

16 Jun 09:16
1647277
Compare
Choose a tag to compare

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

14 Jun 10:02
32301e3
Compare
Choose a tag to compare

Add milvus_client

PyMilvus 2.2.9 Release Notes

02 Jun 11:52
932fc82
Compare
Choose a tag to compare
  • JSON support
  • Dynamic schema
  • Partition key
  • Connection management