[Bug]: The search vector being too far away can lead to inaccurate result sets. #33269
Closed
1 task done
Labels
kind/bug
Issues or changes related a bug
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
Is there an existing issue for this?
Environment
Current Behavior
The search vector is too far away, and the result set contains [0,0] and [1,0].
Search vector:
[1<<25, 0]
Database vector:
[0, 0]
[1, 0]
Search algorithm:
L2
Data storage type:
FLOAT_VECTOR
Test script:
test.txt
[root@master-00926-0 root]# python3 test.txt
=== start connecting to Milvus ===
=== Create collection
hello_milvus
====== Start inserting entities ===
Number of entities in Milvus: 3000
=== Start Creating index IVF_FLAT ===
=== Start loading ===
=== Start searching based on vector similarity ===
hit: id: 0, distance: 1125899906842624.0, entity: {'random': 0.456112344881892, 'embeddings': [0.0, 0.0]}
hit: id: 1, distance: 1125899906842624.0, entity: {'random': 0.2938152926171026, 'embeddings': [1.0, 0.0]}
hit: id: 2, distance: 1125899906842624.0, entity: {'random': 0.7528276205814994, 'embeddings': [0.0, 0.0]}
hit: id: 3, distance: 1125899906842624.0, entity: {'random': 0.6917658945233224, 'embeddings': [1.0, 0.0]}
Expected Behavior
[root@master-00926-0 root]# python3 test.py
=== start connecting to Milvus ===
=== Create collection
hello_milvus
====== Start inserting entities ===
Number of entities in Milvus: 3000
=== Start Creating index IVF_FLAT ===
=== Start loading ===
=== Start searching based on vector similarity ===
hit: id: 1, distance: 11258991476736.0, entity: {'random': 0.9407890488813064, 'embeddings': [1.0, 0.0]}
hit: id: 3, distance: 11258991476736.0, entity: {'random': 0.9319260020306628, 'embeddings': [1.0, 0.0]}
hit: id: 5, distance: 11258991476736.0, entity: {'random': 0.9496021275858367, 'embeddings': [1.0, 0.0]}
hit: id: 7, distance: 11258991476736.0, entity: {'random': 0.4254195287876559, 'embeddings': [1.0, 0.0]}
Steps To Reproduce
No response
Milvus Log
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: