ioredisearch
Version:
Client library for RediSearch Redis Module, designed to work in conjunction with ioredis
16 lines (15 loc) • 565 B
TypeScript
/**
* Represents a single document in a result set
*/
export declare class Document {
id: string;
payload: Object;
constructor(id: string, fields: Object, payload?: Object | null);
/**
* Create a shortened snippet from the document's content
* @param field
* @param size the size of the snippet in characters. It might be a bit longer or shorter
* @param boldTokens a list of tokens we want to make bold (basically the query terms)
*/
snippetize(field: string, size: number | undefined, boldTokens: string[]): void;
}