Skip to content

HTTP client query method is not working as expected #342

@arrrrny

Description

@arrrrny

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 }

return this.apiClient.query({
  filter: " ",
  dbName: dbName,
  collectionName: collectionName,
  outputFields: ["*"],
  params: params,
});

At this point params do nothing

Milvus-node-sdk version:
2.4.4
Milvus version:
2.4.4

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions