Closed rosslavery closed 9 months ago
When making a multi-search request, the response from the server contains collection_name
collection_name
This is absent from the Typescript types that repurpose the SearchResponse type which references SearchParams, which has no collection_name property.
SearchResponse
SearchParams
export interface MultiSearchResponse<T extends DocumentSchema[] = []> { results: { [Index in keyof T]: SearchResponse<T[Index]>; } & { length: T["length"]; }; }
export interface SearchResponse<T extends DocumentSchema> { facet_counts?: SearchResponseFacetCountSchema<T>[]; found: number; out_of: number; page: number; request_params: SearchParams | SearchParamsWithPreset; search_time_ms: number; hits?: SearchResponseHit<T>[]; grouped_hits?: { group_key: string[]; hits: SearchResponseHit<T>[]; }[]; }
To have the types be correct :D
Wrong types!
@rosslavery Could you try with 1.7.2-4?
1.7.2-4
Resolved in this PR + 1.7.2, closing this out. Thank you!
Description
When making a multi-search request, the response from the server contains
collection_name
This is absent from the Typescript types that repurpose the
SearchResponse
type which referencesSearchParams
, which has nocollection_name
property.Expected Behavior
To have the types be correct :D
Actual Behavior
Wrong types!