From 3750e326f1fc8b269e27c586e4cf41d6a610a4c6 Mon Sep 17 00:00:00 2001 From: Darshana Venkatesh Date: Wed, 20 Aug 2025 14:33:25 -0700 Subject: [PATCH] add view to search stages --- packages/mongodb-constants/src/stage-operators.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/mongodb-constants/src/stage-operators.ts b/packages/mongodb-constants/src/stage-operators.ts index 72a1fc09..f090d2dd 100644 --- a/packages/mongodb-constants/src/stage-operators.ts +++ b/packages/mongodb-constants/src/stage-operators.ts @@ -6,6 +6,7 @@ import { DATABASE, ANY_COLLECTION_NAMESPACE, COLLECTION, + VIEW, } from './ns'; type StageOperator = { @@ -896,7 +897,7 @@ const STAGE_OPERATORS = [ meta: 'stage', version: '4.1.11', apiVersions: [], - namespaces: [COLLECTION], + namespaces: [COLLECTION, VIEW], description: 'Performs a full-text search on the specified field(s).', comment: `/** * index: The name of the Search index. @@ -929,7 +930,7 @@ const STAGE_OPERATORS = [ meta: 'stage', version: '4.4.9', apiVersions: [], - namespaces: [COLLECTION], + namespaces: [COLLECTION, VIEW], description: 'Performs a full-text search on the specified field(s) and gets back only the generated search meta data from a query.', comment: `/** @@ -1193,7 +1194,7 @@ const STAGE_OPERATORS = [ meta: 'stage', version: '>=6.0.10 <7.0.0 || >=7.0.2', apiVersions: [], - namespaces: [COLLECTION], + namespaces: [COLLECTION, VIEW], description: 'Performs a kNN search on embeddings in the specified field(s)', comment: `/**