New Features
Load multiple memory replicas
python
collection.load(replica_number=2)
collection.get_replicas()
Support `VARCHAR` data type
1. You can define `VARCHAR` field in schema, also `VARCHAR` field can be used as primary field:
python
FieldSchema(name="pk", dtype=DataType.VARCHAR, is_primary=True, auto_id=False, max_length=100)
2. Just like other data type, you can insert string into `VARCHAR` field:
python
entities = [
[str(i) for i in range(num_entities)],
]
insert_result = collection.insert(entities)
3. You can also choose to build index for `VARCHAR` field, for now, the only supported index for string is `Trie`:
python
collection.create_index(field_name="pk", index_name="index_on_varchar")
4. Just like other data type, scalar filtering expression on `VARCHAR` field is also supported, besides basic filters, prefix match is also supported. Please visist `milvus.io` for more detailed information.
5. `VARCHAR` field as output fields is also supported when you are about to do a search or query:
python
res = collection.query(expr='pk > "str"', output_fields=["pk"])
Support to specify index name for index-related operations
Now, you can specify index name when you create index for field.
python
collection.create_index(field_name="field", index_name="index_name", index_params={})
collection.drop_index(index_name="index_name")
For backward compatibility, if you don't specify the index name, `_default_idx` will be used.
Support Basic Authentication
We add some APIs to support basic authentication:
- create_credential
- update_credential
- delete_credential
- list_cred_users
If there are any users in Milvus server, then the `user` and `password` are required to setup a connection:
python
connections.connect(host="host", port="port", user="user", password="password")
For more detailed information, please refer to [mep27](https://wiki.lfaidata.foundation/display/MIL/MEP+27+--+Support+Basic+Authentication).
Support tls in RPC
Besides basic authentication, we also support to tls in RPC, you can setup a secure connection.
For one-way tls:
python
connections.connect(host=_HOST, port=_PORT, secure=True, server_pem_path="server.pem", server_name="localhost")
For two-way tls:
python
connections.connect(host=_HOST,
port=_PORT,
secure=True,
client_pem_path="client.pem",
client_key_path="client.key",
ca_pem_path="ca.pem",
server_name="localhost")
Enhancement
1. Extend version range of grpcio and ujson
2. Add milvus-proto as submodule
3. Support full uri in connection
python
connections.connect(alias="test", uri="https://example.com:19530")