Skip to content

Commit c0a6c41

Browse files
authored
fix(mongodb-constants): add text.matchCriteria to template COMPASS-8601 (#563)
1 parent 1bde2cb commit c0a6c41

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

packages/devtools-connect/src/connect.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,16 @@ describe('devtools connect', function () {
493493
).to.equal(false);
494494
});
495495

496+
it('returns false if the OIDC_CALLBACK is set', function () {
497+
expect(
498+
isHumanOidcFlow('mongodb://example/?authMechanism=MONGODB-OIDC', {
499+
authMechanismProperties: {
500+
OIDC_CALLBACK: () => Promise.resolve({ accessToken: 'abc123' }),
501+
},
502+
}),
503+
).to.equal(false);
504+
});
505+
496506
it('returns false if the ENVIRONMENT url option is set', function () {
497507
expect(
498508
isHumanOidcFlow(

packages/mongodb-constants/src/stage-operators.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ const STAGE_OPERATORS = [
900900
description: 'Performs a full-text search on the specified field(s).',
901901
comment: `/**
902902
* index: The name of the Search index.
903-
* text: Analyzed search, with required fields of query and path, the analyzed field(s) to search.
903+
* text: Analyzed search, with required fields of query and path, the analyzed field(s) to search. Use matchCriteria to match 'any' or 'all' query terms.
904904
* compound: Combines ops.
905905
* span: Find in text field regions.
906906
* exists: Test for presence of a field.
@@ -912,7 +912,8 @@ const STAGE_OPERATORS = [
912912
index: '\${1:string}',
913913
text: {
914914
query: '\${2:string}',
915-
path: '\${3:string}'
915+
path: '\${3:string}',
916+
matchCriteria: '\${4:any}',
916917
}
917918
}`,
918919
},

0 commit comments

Comments
 (0)