You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@pytest.mark.tags(CaseLabel.L1)deftest_milvus_client_get_normal_string(self):
""" target: test get interface for string field method: create connection, collection, insert delete, and search expected: search/query successfully without deleted data """client=self._connect(enable_milvus_client_api=True)
collection_name=cf.gen_unique_str(prefix)
# 1. create collectionclient_w.create_collection(client, collection_name, default_dim, id_type="string", max_length=ct.default_length)
# 2. insertrng=np.random.default_rng(seed=19530)
rows= [
{default_primary_key_field_name: str(i), default_vector_field_name: list(rng.random((1, default_dim))[0]),
default_float_field_name: i*1.0, default_string_field_name: str(i)} foriinrange(default_nb)]
client_w.insert(client, collection_name, rows)[0]
pks= [str(i) foriinrange(default_nb)]
log.debug(pks)
# 3. get first primary keyfirst_pk_data=client_w.get(client, collection_name, ids=pks[0:1])[0]
assertlen(first_pk_data) ==len(pks[0:1])
first_pk_data_1=client_w.get(client, collection_name, ids="0")[0]
assertfirst_pk_data==first_pk_data_1client_w.drop_collection(client, collection_name)
Environment details
- Hardware/Softward conditions (OS, CPU, GPU, Memory):
- Method of installation (Docker, or from source):
- Milvus version (v0.3.1, or v0.4.0): master latest
- pymilvus version: 2.5.0rc17
- Milvus configuration (Settings you made in `server_config.yaml`):
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Describe the bug
Get interface returns empty when "ids" is a list of string for string primary key
Expected Behavior
Return filtered entities successfully
Steps/Code To Reproduce behavior
Environment details
Anything else?
No response
The text was updated successfully, but these errors were encountered: