Type alias SearchResult

SearchResult: {
    id: any;
    match: MatchInfo;
    queryTerms: string[];
    score: number;
    terms: string[];
    [key: string]: any;
}

Type of the search results. Each search result indicates the document ID, the terms that matched, the match information, the score, and all the stored fields.

Type declaration

  • [key: string]: any

    Stored fields

  • id: any

    The document ID

  • match: MatchInfo

    Match information, see MatchInfo

  • queryTerms: string[]

    List of query terms that matched. For example, if a prefix search for "moto" matches "motorcycle", queryTerms will contain "moto".

  • score: number

    Score of the search results

  • terms: string[]

    List of document terms that matched. For example, if a prefix search for "moto" matches "motorcycle", terms will contain "motorcycle".