UNPKG

571 BTypeScriptView Raw
1import type { SearchIndexDescription } from './types';
2/**
3 * Defines a search index for this Class which will then be added to the Schema.
4 *
5 * @param description - The description of the search index to add.
6 * @example Example:
7 * ```ts
8 * @searchIndex({ name: 'descriptionIndex', definition: { mappings: { dynamic: true }}})
9 * class ClassName {}
10 * ```
11 * @remarks Search indices are only supported when connected to MongoDB Atlas.
12 */
13export declare function searchIndex(description: SearchIndexDescription): ClassDecorator;
14export { searchIndex as SearchIndex };