diff --git a/types/pipelinestage.d.ts b/types/pipelinestage.d.ts index 41b0f863be9..1e6007cd24e 100644 --- a/types/pipelinestage.d.ts +++ b/types/pipelinestage.d.ts @@ -28,6 +28,7 @@ declare module 'mongoose' { | PipelineStage.ReplaceWith | PipelineStage.Sample | PipelineStage.Search + | PipelineStage.SearchMeta | PipelineStage.Set | PipelineStage.SetWindowFields | PipelineStage.Skip @@ -239,6 +240,20 @@ declare module 'mongoose' { } } + export interface SearchMeta { + /** [`$searchMeta` reference](https://www.mongodb.com/docs/atlas/atlas-search/query-syntax/#mongodb-pipeline-pipe.-searchMeta) */ + $searchMeta: { + index?: string; + 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; + }; + [operator: string]: any; + } + } + export interface Set { /** [`$set` reference](https://www.mongodb.com/docs/manual/reference/operator/aggregation/set/) */ $set: Record