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
Create a collection.
Insert 3 entities with the same ID, but different vectors.
Search with the first vector, set output_fields=["id", "vector"]
Return one entity, the distance is 1, but the vector is not the first vector.
Use this script to test:
from pymilvus import (
MilvusClient
)
client = MilvusClient(uri="http://localhost:19530") # standalone
collection_name="demo_collection"
client.drop_collection(collection_name)
client.create_collection(collection_name=collection_name, dimension=4)
client.insert(collection_name=collection_name,data={"id": 5, "vector": [1,2,3,4]})
client.insert(collection_name=collection_name,data={"id": 5, "vector": [2,2,2,2]})
client.insert(collection_name=collection_name,data={"id": 5, "vector": [3,3,3,3]})
print(client.query(collection_name=collection_name, filter="", output_fields=["count(*)"], consistency_level="Strong"))
query_embeddings = [[1,2,3,4]]
result = client.search(
collection_name=collection_name,
data=query_embeddings,
limit=6,
output_fields=["id", "vector"],
)
print("Search results")
for hits in result:
for hit in hits:
print(f"hit: {hit}")
The 'distance' is 0.9999999, but the 'vector' is [3.0, 3.0, 3.0, 3.0], I suppose it should return [1,2,3,4].
Expected Behavior
No response
Steps/Code To Reproduce behavior
No response
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): 2.4.9
- Milvus configuration (Settings you made in `server_config.yaml`):
Anything else?
No response
The text was updated successfully, but these errors were encountered:
sorry - please pardon the ignorance... Just curious, since I'm trying to put together a somewhat similar test case:
did you have Auto_id or some other attribute set as the primary key for this collection, that's why you were able to input same id value for 3 different entities?
could you share the config settings that would let you create/load a Collection without an index specified?
so it did return all 3 results (since (data: ["{'count(*)': 3}"])), it's just that you had expected [1,2,3,4] to rank 1st? Maybe because of the 'Strong' setting that always return the latest data? (your scripts had [3,3,3,3] inserted last)
sorry again if these questions seem dumb... i'm a noob at this and trying to learn as much as i can. Thank you.
Is there an existing issue for this?
Describe the bug
Create a collection.
Insert 3 entities with the same ID, but different vectors.
Search with the first vector, set output_fields=["id", "vector"]
Return one entity, the distance is 1, but the vector is not the first vector.
Use this script to test:
It returns:
The 'distance' is 0.9999999, but the 'vector' is [3.0, 3.0, 3.0, 3.0], I suppose it should return [1,2,3,4].
Expected Behavior
No response
Steps/Code To Reproduce behavior
No response
Environment details
Anything else?
No response
The text was updated successfully, but these errors were encountered: