Skip to content

Commit

Permalink
fix: HttpClient query and search types
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanshuyou committed Jul 22, 2024
1 parent d93b9cf commit ccd1449
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions milvus/types/Http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export interface HttpVectorQueryReq extends HttpBaseReq {
filter?: string;
limit?: number;
offset?: number;
params?: Record<string, string | number>;
partitionNames?: string[];
}

type QueryResult = Record<string, any>[];
Expand All @@ -203,11 +203,20 @@ type QueryResult = Record<string, any>[];
export interface HttpVectorQueryResponse
extends HttpBaseResponse<QueryResult> {}

const a: HttpVectorSearchReq = {} as any;

// search request
export interface HttpVectorSearchReq
extends Omit<HttpVectorQueryReq, 'filter'> {
export interface HttpVectorSearchReq extends HttpVectorQueryReq {
data: FloatVector[];
filter?: string;
annsField?: string;
groupingField?: string;
searchParams?: {
metricType?: string;
params?: {
radius: number;
range_filter: number;
};
};
}

export interface HttpVectorSearchResponse extends HttpVectorQueryResponse {
Expand Down

0 comments on commit ccd1449

Please sign in to comment.