Skip to content

Releases: milvus-io/pymilvus

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

PyMilvus 2.2.8 Release Notes

28 Apr 13:30
c100783
Compare
Choose a tag to compare

New Features

  1. [FEATURE]: Has an utility function to parse if the connection is to Zilliz cloud or opensource Milvus
>>> utility.get_server_type(using="default")
"milvus"
  1. List indexes by field name #1386
>>> utility.list_indexes(collection_name, field_name=vec_field)
[vec_field_idx]
  1. [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.
  2. [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

18 Apr 03:10
2b3f18d
Compare
Choose a tag to compare

PyMilvus 2.2.6 Release Notes

13 Apr 09:46
989ae07
Compare
Choose a tag to compare