-
Notifications
You must be signed in to change notification settings - Fork 39
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
HTTP client query method is not working as expected #342
Comments
@arrrrny |
@zhanshuyou I upgraded to 2.4.6 and issue still persists. My use case is, my collection have zikzakId. I want to get the item with the zikzakId.
Above does not return any data. If I query it from the milvus client, NOT HttpClient as below. it works
|
@arrrrny Okay, I will check on HttpClient. I will get back to you when there is a conclusion. |
@arrrrny |
@zhanshuyou It would be sweet to keep the params as is and have a conversion into a filter before sending it to the server. Since params can only assign values to a specific fields. you can convert them as whatever comes on the params, chain them with && and in the end && with the string on the filter. { zikzakId:6, barcode:'8691234567'} it can indeed convert this into a filter as |
@arrrrny |
@zhanshuyou thats also all that is possible. a param is only an equality. it can be chanined and add to the tail of the filter string with an && operator. Thats how I handle on my end. |
Describe the bug:
When using the httpClient to query the collection, first thing is that filter field is optional on HttpVectorQueryReq but gets an error from the api as being required.
export interface HttpVectorQueryReq extends HttpBaseReq {
outputFields: string[];
filter?: string;
limit?: number;
offset?: number;
params?: Record<string, string | number>;
}
Steps to reproduce:
I passed in filter as empty string filter: " " and it worked however, it does not obey the params at all.
I have a zikzakId field which I want to query the data by and it works if I pass it to the method as filter: "zikzakId == 248" .
return this.apiClient.query({
filter: "zikzakId == 248",
dbName: dbName,
collectionName: collectionName,
outputFields: ["*"],
params: params,
});
Expected behaviour is params to be doing the actual querying
params { zikzakId: 248 }
At this point params do nothing
Milvus-node-sdk version:
2.4.4
Milvus version:
2.4.4
The text was updated successfully, but these errors were encountered: