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]: [restful v2] search api doesn't work well with searchParams #34105

Open
1 task done
wwli05 opened this issue Jun 24, 2024 · 3 comments
Open
1 task done

[Bug]: [restful v2] search api doesn't work well with searchParams #34105

wwli05 opened this issue Jun 24, 2024 · 3 comments
Assignees
Labels
kind/bug Issues or changes related a bug triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@wwli05
Copy link

wwli05 commented Jun 24, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Environment

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

Current Behavior

1.in code [internal/distributed/proxy/httpserver/handler_v2.go], SearchReqV2 struct contains filed [params] , but in restful v2
tutorial section it declares [searchParams] which does not seem match;
2.if i want to declare special param just like [nprobe](FOR IVF_FLAT index) in [params], it does not take effect when i follows the next code in [handler_v2.go]

Expected Behavior

when I declare special search param, it takes effect so that I can take controll of various query params.

Steps To Reproduce

No response

Milvus Log

No response

Anything else?

No response

@wwli05 wwli05 added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 24, 2024
@yanliang567
Copy link
Contributor

please try the code snippet below, or share some code for reproduction

search_params = {
    "metric_type": "IP",
    "params": {"nprob": 128}
}

# Search with limit
res = client.search(
    collection_name="test_collection",
    data=data,
    limit=3,
    search_params=search_params
)

/assign @wwli05
/unassign

@sre-ci-robot sre-ci-robot assigned wwli05 and unassigned yanliang567 Jun 24, 2024
@yanliang567 yanliang567 added triage/needs-information Indicates an issue needs more information in order to work on it. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 24, 2024
@wwli05
Copy link
Author

wwli05 commented Jun 25, 2024

pls check below code
curl --location --request POST "http://${}/v2/vectordb/entities/search"
--header ""
--data-raw '{
"collectionName":"",
"data": [],
"annsField": "vector",
"searchParams": [
"metricType":"IP",
"params":{
"nprobe":16 ---we adjust this value, but the performance has no impact, it seems this param does not take effect in Rest V2
]
}'

@xiaofan-luan
Copy link
Contributor

/assign @PowderLi
can you check on that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues or changes related a bug triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

4 participants