From 62437ee385138537ef621f82830356ede079adc5 Mon Sep 17 00:00:00 2001 From: Louis Mutricy Date: Wed, 9 Feb 2022 20:45:56 +0100 Subject: [PATCH] fix $search highlight path option type --- types/index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/types/index.d.ts b/types/index.d.ts index 9b13af9a269..7933eac5dfd 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -3199,7 +3199,12 @@ declare module 'mongoose' { $search: { [key: string]: any index?: string - highlight?: { path: string; maxCharsToExamine?: number; maxNumPassages?: number } + highlight?: { + /** [`highlightPath` reference](https://docs.atlas.mongodb.com/atlas-search/path-construction/#multiple-field-search) */ + path: string | string[] | { value: string, multi: string}; + maxCharsToExamine?: number; + maxNumPassages?: number; + } } }