Skip to content

[Bug]: [Nightly] Range search results are sometimes missed with metric type COSINE from -1 to 1 #46113

@NicoYuan1986

Description

@NicoYuan1986

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version: 3bbc5d0
- Deployment mode(standalone or cluster): standalone
- MQ type(rocksmq, pulsar or kafka):    rocksmq
- SDK version(e.g. pymilvus v2.0.0rc2):
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

Range search results are sometimes missed with metric type COSINE from -1 to 1.

case name: test_range_search_radius_range_filter_not_in_params

The index type is FLAT, so all results should be returned.

[2025-12-04 22:05:18 - DEBUG - ci_test]: (api_response) : (insert count: 10, delete count: 0, upsert count: 0, timestamp: 462654253996179467, success count: 10, err count: 0  (api_request.py:27)
[2025-12-04 22:05:18 - INFO - ci_test]: inserted 10 data into collection test_range_search_radius_range_filter_not_in_params__5n6mXE8Q (common_func.py:3661)
[2025-12-04 22:05:18 - DEBUG - ci_test]: (api_request)  : [Collection.flush] args: [], kwargs: {'timeout': 180} (api_request.py:52)
[2025-12-04 22:05:18 - DEBUG - ci_test]: (api_response) : None  (api_request.py:27)
[2025-12-04 22:05:19 - DEBUG - ci_test]: (api_request)  : [Collection.flush] args: [], kwargs: {'timeout': 180} (api_request.py:52)
[2025-12-04 22:05:29 - DEBUG - ci_test]: (api_response) : None  (api_request.py:27)
[2025-12-04 22:05:29 - DEBUG - ci_test]: (api_request)  : [Collection.create_index] args: ['float_vector', {'index_type': 'FLAT', 'params': {}, 'metric_type': 'COSINE'}, 1200], kwargs: {'index_name': ''} (api_request.py:52)
[2025-12-04 22:05:30 - DEBUG - ci_test]: (api_response) : Status(code=0, message=)  (api_request.py:27)
[2025-12-04 22:05:30 - DEBUG - ci_test]: (api_request)  : [Collection.load] args: [None, 1, 180], kwargs: {} (api_request.py:52)
[2025-12-04 22:05:32 - DEBUG - ci_test]: (api_response) : None  (api_request.py:27)
[2025-12-04 22:05:32 - DEBUG - ci_test]: (api_request)  : [Collection.search] args: [[[-0.07139501760166576, -0.09793190888091555, -0.03413574422992598, -0.09801042034059655, 0.037367880963059735, 0.05517311233311221, -0.0007437747787359994, 0.13430181054811635, -0.04638100058946274, -0.02985363097734623, 0.04799619346354395, 0.06976921112699488, 0.09505519679797479, 0.131908828236......, kwargs: {} (api_request.py:52)
[2025-12-04 22:05:32 - DEBUG - ci_test]: (api_response) : data: [[{'int64': 0, 'distance': 1.0, 'entity': {}}, {'int64': 1, 'distance': 0.2618202567100525, 'entity': {}}, {'int64': 5, 'distance': 0.0959162786602974, 'entity': {}}, {'int64': 6, 'distance': 0.03810182586312294, 'entity': {}}, {'int64': 2, 'distance': 0.021085519343614578, 'entity': {}}, {'in......  (api_request.py:27)
[2025-12-04 22:05:32 - INFO - ci_test]: search_results_check: checking the searching results (func_check.py:418)
[2025-12-04 22:05:32 - INFO - ci_test]: search_results_check: Numbers of query searched is correct (func_check.py:444)
[2025-12-04 22:05:32 - ERROR - ci_test]: search_results_check: limit(topK) searched (9) is not equal with expected (10) (func_check.py:458)

Expected Behavior

pass

Steps To Reproduce

1. create a collection
2. insert 10 data
3. create FLAT index, user metric type COSINE
4. load
5. search with range COSINE from -1 ~ 1
6. only 9 data returned

Milvus Log

https://jenkins.milvus.io:18080/blue/organizations/jenkins/Milvus%20Nightly%20CI(new)/detail/master/554/pipeline/101/

Anything else?

No response

Metadata

Metadata

Labels

kind/bugIssues or changes related a bugtriage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions