Closed Djones4822 closed 11 months ago
I am sidestepping this issue for now with this snippet
import { DocumentSchema, SearchParams, SearchResponse } from 'typesense/lib/Typesense/Documents'
export interface SearchResponseFixed<T extends DocumentSchema> extends SearchResponse<T> {
found_docs?: number
}
@Djones4822 Thank you for catching this. I've pushed out a fix in 1.7.2-3
.
Description
The optional property
found_docs
is not included in the SearchResponse interface. This property is included when the query includes thegroup_by
parameterSteps to reproduce
Run a query using group_by on a faceted field. The response object includes the
found_docs
fieldBeginning at line 120 in
typesense/lib/Typesense/Documents.d.ts
Expected Behavior
All properties of the response object are included
Actual Behavior
Property is missing when using
group_by
Metadata
Typesense Version: Server: 1.25.1 Client: 1.7.1
OS: Windows and Ubuntu 22.04