Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: [milvus_client_p2] The parameter "partition_names" of "hybrid_search" in error message is "partition_name_array" #2589

Open
1 task done
binbinlv opened this issue Jan 22, 2025 · 0 comments
Labels
kind/bug Something isn't working
Milestone

Comments

@binbinlv
Copy link

binbinlv commented Jan 22, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The parameter "partition_names" of "hybrid_search" in error message is "partition_name_array"

input invalid value for partition_names, it reports error:

code=1, message=`partition_name_array` value 1 is illegal

Expected Behavior

The parameter "partition_names" of "hybrid_search" in error message is "partition_names" too.

Steps/Code To Reproduce behavior

    @pytest.mark.tags(CaseLabel.L1)
    @pytest.mark.parametrize("invalid_partition_names", [1, "1"])
    def test_milvus_client_hybrid_search_invalid_partition_names(self, invalid_partition_names):
        """
        target: test hybrid search with inconsistent metric type (default is IP) with that of index
        method: create connection, collection, insert and search with not consistent metric type
        expected: Raise exception
        """
        client = self._client()
        collection_name = cf.gen_unique_str(prefix)
        # 1. create collection
        self.create_collection(client, collection_name, default_dim)
        # 2. hybrid search
        rng = np.random.default_rng(seed=19530)
        vectors_to_search = rng.random((1, 8))
        sub_search1 = AnnSearchRequest(vectors_to_search, "embeddings", {"level": 1}, 20, expr="id<100")
        ranker = WeightedRanker(0.2, 0.8)
        error = {ct.err_code: 1,
                 ct.err_msg: f"`partition_name_array` value {invalid_partition_names} is illegal"}
        self.hybrid_search(client, collection_name, [sub_search1], ranker, limit=default_limit,
                           partition_names=invalid_partition_names, check_task=CheckTasks.err_res, check_items=error)
        self.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):  all
- Pymilvus version: 2.5.4rc1
- Milvus configuration (Settings you made in `server_config.yaml`):

Anything else?

No response

@binbinlv binbinlv added the kind/bug Something isn't working label Jan 22, 2025
@XuanYang-cn XuanYang-cn added this to the 2.4.15 milestone Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants