SearchResult type

Contains a document found by a search query, plus associated metadata.

type SearchResult<TModel, TFields> = {
  captions?: QueryCaptionResult[]
  document: NarrowedModel<TModel, TFields>
  highlights?: { [k in SelectFields<TModel>]?: string[] }
  rerankerScore?: number
  score: number
}