SearchResult | MiniSearch (original) (raw)

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

Stored fields

The document ID

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

Score of the search results

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