diff --git a/README.md b/README.md index dfe36bbfb8..ac735138ab 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This repository is a monorepo for all the various components in the MongoDB Shel all environments (REPL, Browser, Compass, etc). For our official documentation, please visit [MongoDB Docs -page](https://docs.mongodb.com/mongodb-shell). +page](https://mongodb.com/docs/mongodb-shell). MongoDB Shell works with MongoDB servers >= 4.0. @@ -108,7 +108,7 @@ variable. For detailed instructions for each of our supported platforms, please Start mongosh using 'ships' database on specified connection string: $ mongosh mongodb://192.168.0.5:9999/ships - For more information on usage: https://docs.mongodb.com/mongodb-shell. + For more information on usage: https://mongodb.com/docs/mongodb-shell. ``` diff --git a/packages/cli-repl/README.md b/packages/cli-repl/README.md index 1c9e24f7cd..5f5c6ac0c4 100644 --- a/packages/cli-repl/README.md +++ b/packages/cli-repl/README.md @@ -93,7 +93,7 @@ of mongosh, visit https://www.mongodb.com/try/download/shell. Start mongosh using 'ships' database on specified connection string: $ mongosh mongodb://192.168.0.5:9999/ships - For more information on usage: https://docs.mongodb.com/mongodb-shell. + For more information on usage: https://mongodb.com/docs/mongodb-shell. ``` @@ -306,5 +306,5 @@ npm install --save @mongosh/cli-repl [mongosh]: https://github.com/mongodb-js/mongosh [evergreen-url]: https://evergreen.mongodb.com/waterfall/mongosh [pino-js]: https://github.com/pinojs/pino -[object-id]: https://docs.mongodb.com/manual/reference/method/ObjectId/ +[object-id]: https://mongodb.com/docs/manual/reference/method/ObjectId/ [error-object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error diff --git a/packages/cli-repl/src/constants.ts b/packages/cli-repl/src/constants.ts index 94bfc5c371..537757ff14 100644 --- a/packages/cli-repl/src/constants.ts +++ b/packages/cli-repl/src/constants.ts @@ -181,7 +181,7 @@ export const USAGE = ` ${clr('$ mongosh mongodb://192.168.0.5:9999/ships', 'mongosh:uri')} ${clr(i18n.__('cli-repl.args.moreInformation'), 'bold')} ${clr( - 'https://docs.mongodb.com/mongodb-shell', + 'https://mongodb.com/docs/mongodb-shell', 'mongosh:uri' )}. ` diff --git a/packages/cli-repl/src/format-output.spec.ts b/packages/cli-repl/src/format-output.spec.ts index 694425e087..191b0a21da 100644 --- a/packages/cli-repl/src/format-output.spec.ts +++ b/packages/cli-repl/src/format-output.spec.ts @@ -510,7 +510,7 @@ test 558.79 GiB format({ value: { help: 'Shell API', - docs: 'https://docs.mongodb.com', + docs: 'https://mongodb.com/docs', attr: [ { name: 'show dbs', @@ -530,7 +530,7 @@ test 558.79 GiB format({ value: { help: 'Shell API', - docs: 'https://docs.mongodb.com', + docs: 'https://mongodb.com/docs', attr: [ { description: 'list available databases', @@ -561,7 +561,7 @@ test 558.79 GiB }) ); - expect(output).to.not.contain('https://docs.mongodb.com'); + expect(output).to.not.contain('https://mongodb.com/docs'); expect(output).to.contain('list available databases'); }); diff --git a/packages/i18n/src/locales/en_US.ts b/packages/i18n/src/locales/en_US.ts index 311c526389..be1c68ca98 100644 --- a/packages/i18n/src/locales/en_US.ts +++ b/packages/i18n/src/locales/en_US.ts @@ -167,7 +167,7 @@ const translations: Catalog = { ShellApi: { help: { description: 'Shell Help', - link: 'https://docs.mongodb.com/manual/reference/method', + link: 'https://mongodb.com/docs/manual/reference/method', attributes: { log: { description: @@ -200,16 +200,16 @@ const translations: Catalog = { connect: { description: 'Create a new connection and return the Database object. Usage: connect(URI, username [optional], password [optional])', - link: 'https://docs.mongodb.com/manual/reference/method/connect', + link: 'https://mongodb.com/docs/manual/reference/method/connect', }, Mongo: { description: 'Create a new connection and return the Mongo object. Usage: new Mongo(URI, options [optional])', - link: 'https://docs.mongodb.com/manual/reference/method/Mongo/#Mongo', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo/#Mongo', }, version: { description: 'Shell version', - link: 'https://docs.mongodb.com/manual/reference/method/version/', + link: 'https://mongodb.com/docs/manual/reference/method/version/', }, load: { description: @@ -226,11 +226,11 @@ const translations: Catalog = { }, passwordPrompt: { description: 'Prompts the user for a password', - link: 'https://docs.mongodb.com/manual/reference/method/passwordPrompt/', + link: 'https://mongodb.com/docs/manual/reference/method/passwordPrompt/', }, sleep: { description: 'Sleep for the specified number of milliseconds', - link: 'https://docs.mongodb.com/manual/reference/method/sleep/', + link: 'https://mongodb.com/docs/manual/reference/method/sleep/', example: 'sleep(5000)', }, cls: { @@ -278,58 +278,58 @@ const translations: Catalog = { description: 'Aggregation Class', attributes: { close: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.close', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.close', description: 'Instructs the server to close a cursor and free associated server resources. The server will automatically close cursors that have no remaining results, as well as cursors that have been idle for a period of time and lack the cursor.noCursorTimeout() option.', example: 'db.collection.aggregate(pipeline, options).close()', }, forEach: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.forEach', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.forEach', description: 'Iterates the cursor to apply a JavaScript function to each document from the cursor.', example: 'db.collection.aggregate(pipeline, options).forEach(function)', }, hasNext: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.hasNext', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.hasNext', description: "cursor.hasNext() returns true if the cursor returned by the db.collection.aggregate() can iterate further to return more documents. NOTE: if the cursor is tailable with awaitData then hasNext will block until a document is returned. To check if a document is in the cursor's batch without waiting, use tryNext instead", example: 'db.collection.aggregate(pipeline, options).hasNext()', }, isClosed: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.isClosed', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.isClosed', description: 'Returns true if the cursor is closed.', example: 'db.collection.aggregate(pipeline, options).isClosed()', }, isExhausted: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.isExhausted', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.isExhausted', description: 'cursor.isExhausted() returns true if the cursor is closed and there are no remaining objects in the batch.', example: 'db.collection.aggregate(pipeline, options).isExhausted()', }, itcount: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.itcount', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.itcount', description: 'Counts the number of documents remaining in a cursor. itcount() is similar to cursor.count(), but actually executes the query on an existing iterator, exhausting its contents in the process.', example: 'db.collection.aggregate(pipeline, options).itcount()', }, map: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.map', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.map', description: 'Applies the first argument, a function, to each document visited by the cursor and collects the return values from successive application into an array.', example: 'db.collection.aggregate(pipeline, options).map(function)', }, maxTimeMS: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.maxTimeMS', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.maxTimeMS', description: 'Specifies a cumulative time limit in milliseconds for processing operations on a cursor.', example: 'db.collection.aggregate(pipeline, options).maxTimeMS(timeLimit)', }, next: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.next', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.next', description: "The next document in the cursor returned by the db.collection.aggregate() method. NOTE: if the cursor is tailable with awaitData then next will block until a document is returned. To check if a document is in the cursor's batch without waiting, use tryNext instead", example: 'db.collection.aggregate(pipeline, options).next()', @@ -339,21 +339,21 @@ const translations: Catalog = { "If a document is in the cursor's batch it will be returned, otherwise null will be returned", }, explain: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.explain', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.explain', description: 'Provides information on the query plan for db.collection.aggregate() method.', example: 'db.collection.aggregate(pipeline, options).explain([verbosity])', }, objsLeftInBatch: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.objsLeftInBatch', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.objsLeftInBatch', description: 'cursor.objsLeftInBatch() returns the number of documents remaining in the current batch.', example: 'db.collection.aggregate(pipeline, options).objsLeftInBatch()', }, toArray: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.toArray', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.toArray', description: 'The toArray() method returns an array that contains all the documents from a cursor. The method iterates completely the cursor, loading all the documents into RAM and exhausting the cursor.', example: 'db.collection.aggregate(pipeline, options).toArray()', @@ -375,14 +375,14 @@ const translations: Catalog = { 'db.collection.aggregate(pipeline, options).projection(field)', }, sort: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.sort', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.sort', description: 'Specifies the order in which the query returns matching documents. You must apply sort() to the cursor before retrieving any documents from the database.', example: 'db.collection.aggregate(pipeline, options).sort(sortDocument)', }, skip: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.skip', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.skip', description: 'Call the cursor.skip() method on a cursor to control where MongoDB begins returning results. This approach may be useful in implementing paginated results.', example: @@ -535,166 +535,166 @@ const translations: Catalog = { description: 'Collection Class', attributes: { watch: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.watch', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.watch', description: 'Opens a change stream cursor on the collection', example: 'const cursor = db.collection.watch(pipeline, options)', }, aggregate: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.aggregate', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.aggregate', description: 'Calculates aggregate values for the data in a collection or a view.', example: 'db.collection.aggregate(pipeline, options)', }, bulkWrite: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.bulkWrite', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.bulkWrite', description: 'Performs multiple write operations with controls for order of execution.', example: 'db.collection.bulkWrite(operations, options)', }, countDocuments: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.countDocuments', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.countDocuments', description: 'Returns the count of documents that match the query for a collection or view.', example: 'db.collection.countDocuments(query, options)', }, count: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.count', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.count', description: 'Returns the count of documents that would match a find() query for the collection or view.', example: 'db.collection.count(query, options)', }, dataSize: { - link: 'hhttps://docs.mongodb.com/manual/reference/method/db.collection.dataSize', + link: 'hhttps://mongodb.com/docs/manual/reference/method/db.collection.dataSize', description: 'This method provides a wrapper around the size output of the collStats (i.e. db.collection.stats()) command.', example: 'db.collection.dataSize()', }, deleteMany: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.deleteMany', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.deleteMany', description: 'Removes all documents that match the filter from a collection.', example: 'db.collection.deleteMany()', }, deleteOne: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.deleteOne', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.deleteOne', description: 'Removes a single document from a collection.', example: 'db.collection.deleteOne(filter, options)', }, distinct: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.distinct', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.distinct', description: 'Finds the distinct values for a specified field across a single collection or view and returns the results in an array.', example: 'db.collection.distinct(field, query, options)', }, estimatedDocumentCount: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.estimatedDocumentCount', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.estimatedDocumentCount', description: 'Returns the count of all documents in a collection or view.', example: 'db.collection.estimatedDocumentCount(options)', }, find: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.find', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.find', description: 'Selects documents in a collection or view.', example: 'db.collection.find(query, projection, options)', }, findAndModify: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.findAndModify', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.findAndModify', description: 'Modifies and returns a single document.', example: 'db.collection.findAndModify(spec)', }, findOne: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.findOne', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.findOne', description: 'Selects documents in a collection or view.', example: 'db.collection.findOne(query, projection, options)', }, findOneAndDelete: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndDelete', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.findOneAndDelete', description: 'Deletes a single document based on the filter and sort criteria, returning the deleted document.', example: 'db.collection.findOneAndDelete(filter, options)', }, findOneAndReplace: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.findOneAndReplace', description: 'Modifies and replaces a single document based on the filter and sort criteria.', example: 'db.collection.findOneAndReplace(filter, replacement, options)', }, findOneAndUpdate: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndUpdate', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.findOneAndUpdate', description: 'Updates a single document based on the filter and sort criteria.', example: 'db.collection.findOneAndUpdate(filter, update, options)', }, getIndexes: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.getIndexes', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.getIndexes', description: 'Returns an array that holds a list of documents that identify and describe the existing indexes on the collection.', example: 'db.collection.getIndexes()', }, getIndices: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.getIndexes', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.getIndexes', description: 'Alias for getIndexes. Returns an array that holds a list of documents that identify and describe the existing indexes on the collection.', example: 'db.collection.getIndices()', }, insert: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.insert', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.insert', description: 'Inserts a document or documents into a collection.', example: 'db.collection.insert(document, options)', }, insertMany: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.insertMany', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.insertMany', description: 'Inserts multiple documents into a collection.', example: 'db.collection.insertMany(documents, options)', }, insertOne: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.insertOne', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.insertOne', description: 'Inserts a document into a collection.', example: 'db.collection.insertOne(document, options)', }, isCapped: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.isCapped', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.isCapped', description: 'Checks if a collection is capped', example: 'db.collection.isCapped()', }, remove: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.remove', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.remove', description: 'Removes documents from a collection.', example: 'db.collection.remove(query, options)', }, stats: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.stats', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.stats', description: 'Returns statistics about the collection.', example: 'db.collection.stats(options)', }, storageSize: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.storageSize', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.storageSize', description: 'The total amount of storage allocated to this collection for document storage.', example: 'db.collection.storageSize()', }, replaceOne: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.replaceOne', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.replaceOne', description: 'Replaces a single document within the collection based on the filter.', example: 'db.collection.replaceOne(filter, replacement, options)', }, totalSize: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.totalSize', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.totalSize', description: 'The total size in bytes of the data in the collection plus the size of every index on the collection.', example: 'db.collection.totalSize()', }, update: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.update', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.update', description: 'Modifies an existing document or documents in a collection.', example: 'db.collection.update(query, update, options)', }, updateMany: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.updateMany', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.updateMany', description: 'Updates all documents that match the specified filter for a collection.', example: 'db.collection.updateMany(filter, update, options)', @@ -711,19 +711,19 @@ const translations: Catalog = { example: 'db.coll.convertToCapped(10000)', }, createIndexes: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.createIndexes', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.createIndexes', description: 'Creates one or more indexes on a collection', example: "db.coll.createIndexes([{ category: 1 }], { name: 'index-1' })", }, createIndex: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.createIndex', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.createIndex', description: 'Creates one index on a collection', example: "db.coll.createIndex({ category: 1 }, { name: 'index-1' })", }, ensureIndex: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.ensureIndex', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.ensureIndex', description: 'Creates one index on a collection', example: "db.coll.ensureIndex({ category: 1 }, { name: 'index-1' })", @@ -740,46 +740,46 @@ const translations: Catalog = { example: 'db.collection.getIndexKeys()', }, getIndexSpecs: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.getIndexes', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.getIndexes', description: 'Alias for getIndexes. Returns an array that holds a list of documents that identify and describe the existing indexes on the collection.', example: 'db.collection.getIndexSpecs()', }, totalIndexSize: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.totalIndexSize', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.totalIndexSize', description: 'Reports the total size used by the indexes on a collection.', example: 'db.collection.totalIndexSize()', }, dropIndexes: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.dropIndexes', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.dropIndexes', description: 'Drops the specified index or indexes (except the index on the _id field) from a collection.', example: 'db.collection.dropIndexes()', }, dropIndex: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.dropIndex', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.dropIndex', description: 'Drops or removes the specified index from a collection.', example: 'db.collection.dropIndex()', }, reIndex: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.reIndex', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.reIndex', description: 'Rebuilds all existing indexes on a collection.', example: '', }, hideIndex: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.hideIndex', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.hideIndex', description: 'Hides an existing index from the query planner.', example: 'db.collection.hideIndex("index_1")', }, unhideIndex: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.unhideIndex', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.unhideIndex', description: 'Unhides an existing index from the query planner.', example: 'db.collection.unhideIndex("index_1")', }, drop: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.drop', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.drop', description: 'Removes a collection or view from the database.', example: 'db.students.drop()', }, @@ -801,7 +801,7 @@ const translations: Catalog = { example: 'db.coll.getName()', }, renameCollection: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.renameCollection/', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.renameCollection/', description: 'Renames a collection.', example: 'db.coll.renameCollection("newName")', }, @@ -813,12 +813,12 @@ const translations: Catalog = { 'db.collection.runCommand("text", { search: "searchKeywords" })', }, explain: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.explain', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.explain', description: 'Returns information on the query plan.', example: 'db.collection.explain().', }, updateOne: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.updateOne', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.updateOne', description: 'Updates a single document within the collection based on the filter.', example: 'db.collection.updateOne(filter, update, options)', @@ -828,93 +828,93 @@ const translations: Catalog = { example: 'db.collection.getMongo()', }, latencyStats: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.latencyStats', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.latencyStats', description: "returns the $latencyStats aggregation for the collection. Takes an options document with an optional boolean 'histograms' field.", example: 'db.latencyStats({ histograms: true })', }, initializeUnorderedBulkOp: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.initializeUnorderedBulkOp', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.initializeUnorderedBulkOp', description: 'Initializes an unordered bulk command. Returns an instance of Bulk', example: 'db.coll.initializeUnorderedBulkOp()', }, initializeOrderedBulkOp: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.initializeOrderedBulkOp', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.initializeOrderedBulkOp', description: 'Initializes an ordered bulk command. Returns an instance of Bulk', example: 'db.coll.initializeOrderedBulkOp()', }, getPlanCache: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.getPlanCache/', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.getPlanCache/', description: 'Returns an interface to access the query plan cache for a collection. The interface provides methods to view and clear the query plan cache.', example: 'db.coll.getPlanCache()', }, validate: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.validate', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.validate', description: 'Calls the validate command. Default full value is false', example: 'db.coll.validate()', }, mapReduce: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.mapReduce', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.mapReduce', description: 'Calls the mapReduce command', example: 'db.coll.mapReduce(mapFn, reduceFn, options)', }, getShardVersion: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.getShardVersion', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.getShardVersion', description: 'Calls the getShardVersion command', example: 'db.coll.getShardVersion()', }, getShardDistribution: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.getShardDistribution', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.getShardDistribution', description: 'Prints the data distribution statistics for a sharded collection.', example: 'db.coll.getShardDistribution()', }, analyzeShardKey: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.analyzeShardKey', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.analyzeShardKey', description: 'Returns metrics for evaluating a shard key. That is, ‘key’ can be a candidate shard key for an unsharded or sharded collection, or the current shard key for a sharded collection.', example: 'db.coll.analyzeShardKey(key)', }, configureQueryAnalyzer: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.configureQueryAnalyzer', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.configureQueryAnalyzer', description: 'Starts or stops collecting metrics about reads and writes against an unsharded or sharded collection.', example: 'db.coll.configureQueryAnalyzer(options)', }, checkMetadataConsistency: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.checkMetadataConsistency', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.checkMetadataConsistency', description: 'Returns a cursor with information about metadata inconsistencies', example: 'db.coll.checkMetadataConsistency()', }, getSearchIndexes: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.getSearchIndexes', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.getSearchIndexes', description: 'Returns an array that holds a list of documents that identify and describe the existing search indexes on the collection.', example: 'db.coll.getSearchIndexes()', }, createSearchIndexes: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.createSearchIndexes', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.createSearchIndexes', description: 'Creates one or more search indexes on a collection', example: 'db.coll.createSearchIndexes(specs)', }, createSearchIndex: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.createSearchIndex', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.createSearchIndex', description: 'Creates one search indexes on a collection', example: 'db.coll.createSearchIndex(, definition)', }, dropSearchIndex: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.dropSearchIndex', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.dropSearchIndex', description: 'Drops or removes the specified search index from a collection.', example: 'db.coll.dropSearchIndex(name)', }, updateSearchIndex: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.updateSearchIndex', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.updateSearchIndex', description: 'Updates the sepecified search index.', example: 'db.coll.updateSearchIndex(name, definition)', }, @@ -971,144 +971,144 @@ const translations: Catalog = { description: 'Collection Cursor', attributes: { addOption: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.addOption', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.addOption', description: 'Adds OP_QUERY wire protocol flags, such as the tailable flag, to change the behavior of queries. Accepts: DBQuery.Option fields tailable, slaveOk, noTimeout, awaitData, exhaust, partial.', example: 'db.collection.find(query, projection, options).addOption(flag)', }, allowPartialResults: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.allowPartialResults', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.allowPartialResults', description: "Sets the 'partial' option to true.", example: 'db.collection.find(query, projection, options).allowPartialResults()', }, allowDiskUse: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.allowDiskUse', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.allowDiskUse', description: "Sets the 'allowDiskUse' option. If no argument is passed, the default is true.", example: 'db.collection.find(query, projection, options).sort(sort).allowDiskUse(false)', }, batchSize: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.batchSize', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.batchSize', description: 'Specifies the number of documents to return in each batch of the response from the MongoDB instance. In most cases, modifying the batch size will not affect the user or the application, as the mongo shell and most drivers return results as if MongoDB returned a single batch.', example: 'db.collection.find(query, projection, options).batchSize(10)', }, close: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.close', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.close', description: 'Instructs the server to close a cursor and free associated server resources. The server will automatically close cursors that have no remaining results, as well as cursors that have been idle for a period of time and lack the cursor.noCursorTimeout() option.', example: 'db.collection.find(query, projection, options).close()', }, collation: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.collation', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.collation', description: 'Specifies the collation for the cursor returned by the db.collection.find(). To use, append to the db.collection.find().', example: 'db.collection.find(query, projection, options).collation(collationDocument)', }, comment: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.comment', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.comment', description: 'Adds a comment field to the query.', example: "db.collection.find(query, projection, options).comment('Comment')", }, count: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.count', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.count', description: 'Counts the number of documents referenced by a cursor.', example: 'db.collection.find(query, projection, options).count()', }, explain: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.explain', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.explain', description: 'Provides information on the query plan for the db.collection.find() method.', example: 'db.collection.find(query, projection, options).explain()', }, forEach: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.forEach', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.forEach', description: 'Iterates the cursor to apply a JavaScript function to each document from the cursor.', example: 'db.collection.find(query, projection, options).forEach(function)', }, getQueryPlan: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.explain', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.explain', description: 'Runs cursor.explain()', example: 'db.collection.find(query, projection, options).getQueryPlan()', }, hasNext: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.hasNext', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.hasNext', description: "cursor.hasNext() returns true if the cursor returned by the db.collection.find() query can iterate further to return more documents. NOTE: if the cursor is tailable with awaitData then hasNext will block until a document is returned. To check if a document is in the cursor's batch without waiting, use tryNext instead", example: 'db.collection.find(query, projection, options).hasNext()', }, hint: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.hint', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.hint', description: 'Call this method on a query to override MongoDB’s default index selection and query optimization process. Use db.collection.getIndexes() to return the list of current indexes on a collection.', example: 'db.collection.find(query, projection, options).hint(index)', }, isClosed: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.isClosed', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.isClosed', description: 'Returns true if the cursor is closed.', example: 'db.collection.find(query, projection, options).isClosed()', }, isExhausted: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.isExhausted', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.isExhausted', description: 'cursor.isExhausted() returns true if the cursor is closed and there are no remaining objects in the batch.', example: 'db.collection.find(query, projection, options).isExhausted()', }, itcount: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.itcount', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.itcount', description: 'Counts the number of documents remaining in a cursor. itcount() is similar to cursor.count(), but actually executes the query on an existing iterator, exhausting its contents in the process.', example: 'db.collection.find(query, projection, options).itcount()', }, length: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.count', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.count', description: 'Runs cursor.count()', example: 'db.collection.find(query, projection, options).length()', }, limit: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.limit', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.limit', description: 'Use the limit() method on a cursor to specify the maximum number of documents the cursor will return.', example: 'db.collection.find(query, projection, options).limit(2)', }, map: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.map', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.map', description: 'Applies the first argument, a function, to each document visited by the cursor and collects the return values from successive application into an array.', example: 'db.collection.find(query, projection, options).map(function)', }, max: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.max', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.max', description: 'Specifies the exclusive upper bound for a specific index in order to constrain the results of find(). max() provides a way to specify an upper bound on compound key indexes.', example: 'db.collection.find(query, projection, options).max(indexBoundsDocument)', }, maxScan: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.maxScan', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.maxScan', description: 'deprecated, non-functional', }, maxTimeMS: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.maxTimeMS', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.maxTimeMS', description: 'Specifies a cumulative time limit in milliseconds for processing operations on a cursor.', example: @@ -1121,7 +1121,7 @@ const translations: Catalog = { 'db.collection.find(query, projection, options).maxAwaitTimeMS(timeLimit)', }, min: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.min', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.min', description: 'Specifies the inclusive lower bound for a specific index in order to constrain the results of find(). min() provides a way to specify lower bounds on compound key indexes.', example: @@ -1134,7 +1134,7 @@ const translations: Catalog = { 'db.collection.find(query, projection, options).modifiers()', }, next: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.next', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.next', description: "The next document in the cursor returned by the db.collection.find() method. NOTE: if the cursor is tailable with awaitData then hasNext will block until a document is returned. To check if a document is in the cursor's batch without waiting, use tryNext instead", example: 'db.collection.find(query, projection, options).next()', @@ -1144,14 +1144,14 @@ const translations: Catalog = { "If a document is in the cursor's batch it will be returned, otherwise null will be returned", }, noCursorTimeout: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.noCursorTimeout', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.noCursorTimeout', description: 'Instructs the server to avoid closing a cursor automatically after a period of inactivity.', example: 'db.collection.find(query, projection, options).noCursorTimeout()', }, objsLeftInBatch: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.objsLeftInBatch', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.objsLeftInBatch', description: 'cursor.objsLeftInBatch() returns the number of documents remaining in the current batch.', example: @@ -1175,7 +1175,7 @@ const translations: Catalog = { 'Deprecated. The shell provides auto-formatting so this method is no longer useful', }, readConcern: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.readConcern', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.readConcern', description: 'Specify a read concern for the db.collection.find() method.', example: @@ -1187,14 +1187,14 @@ const translations: Catalog = { example: '', }, readPref: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.readPref', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.readPref', description: 'Append readPref() to a cursor to control how the client routes the query to members of the replica set.', example: 'db.collection.find(query, projection, options).readPref(mode, tagSet)', }, returnKey: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.returnKey', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.returnKey', description: 'Modifies the cursor to return index keys rather than the documents.', example: @@ -1208,20 +1208,20 @@ const translations: Catalog = { 'db.collection.find(query, projection, options).showDiskLoc()', }, showRecordId: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.showRecordId', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.showRecordId', description: 'Modifies the output of a query by adding a field $recordId to matching documents. $recordId is the internal key which uniquely identifies a document in a collection.', example: 'db.collection.find(query, projection, options).showRecordId', }, size: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.size', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.size', description: 'A count of the number of documents that match the db.collection.find() query after applying any cursor.skip() and cursor.limit() methods.', example: 'db.collection.find(query, projection, options).size()', }, skip: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.skip', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.skip', description: 'Call the cursor.skip() method on a cursor to control where MongoDB begins returning results. This approach may be useful in implementing paginated results.', example: @@ -1235,20 +1235,20 @@ const translations: Catalog = { 'db.collection.find(query, projection, options).snapshot()', }, sort: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.sort', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.sort', description: 'Specifies the order in which the query returns matching documents. You must apply sort() to the cursor before retrieving any documents from the database.', example: 'db.collection.find(query, projection, options).sort(sortDocument)', }, tailable: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.tailable', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.tailable', description: 'Marks the cursor as tailable.', example: 'db.collection.find(query, projection, options).tailable({ awaitData: true })', }, toArray: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.toArray', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.toArray', description: 'The toArray() method returns an array that contains all the documents from a cursor. The method iterates completely the cursor, loading all the documents into RAM and exhausting the cursor.', example: @@ -1262,385 +1262,385 @@ const translations: Catalog = { description: 'Database Class', attributes: { sql: { - link: 'https://docs.mongodb.com/manual/reference/method/db.sql', + link: 'https://mongodb.com/docs/manual/reference/method/db.sql', description: '(Experimental) Runs a SQL query against Atlas Data Lake. Note: this is an experimental feature that may be subject to change in future releases.', example: 'const cursor = db.sql("SELECT * FROM myCollection", options)', }, watch: { - link: 'https://docs.mongodb.com/manual/reference/method/db.watch', + link: 'https://mongodb.com/docs/manual/reference/method/db.watch', description: 'Opens a change stream cursor on the database', example: 'const cursor = db.watch(pipeline, options)', }, aggregate: { - link: 'https://docs.mongodb.com/manual/reference/method/db.aggregate', + link: 'https://mongodb.com/docs/manual/reference/method/db.aggregate', description: 'Runs a specified admin/diagnostic pipeline which does not require an underlying collection.', example: 'db.aggregate(pipeline, options)', }, runCommand: { - link: 'https://docs.mongodb.com/manual/reference/method/db.runCommand', + link: 'https://mongodb.com/docs/manual/reference/method/db.runCommand', description: 'Runs an arbitrary command on the database.', example: 'db.runCommand({ text: "myCollection", search: "searchKeywords" })', }, dropDatabase: { - link: 'https://docs.mongodb.com/manual/reference/method/db.dropDatabase', + link: 'https://mongodb.com/docs/manual/reference/method/db.dropDatabase', description: 'Removes the current database, deleting the associated data files.', example: 'db.dropDatabase([writeConcern])', }, adminCommand: { - link: 'https://docs.mongodb.com/manual/reference/method/db.adminCommand', + link: 'https://mongodb.com/docs/manual/reference/method/db.adminCommand', description: 'Runs an arbitrary command against the admin database.', example: 'db.adminCommand({ serverStatus: 1 })', }, getCollectionInfos: { - link: 'https://docs.mongodb.com/manual/reference/method/db.getCollectionInfos', + link: 'https://mongodb.com/docs/manual/reference/method/db.getCollectionInfos', description: 'Returns an array of documents with collection information, i.e. collection name and options, for the current database.', example: 'db.getCollectionInfos()', }, getCollectionNames: { - link: 'https://docs.mongodb.com/manual/reference/method/db.getCollectionNames', + link: 'https://mongodb.com/docs/manual/reference/method/db.getCollectionNames', description: 'Returns an array containing the names of all collections in the current database.', example: 'db.getCollectionNames', }, getSiblingDB: { - link: 'https://docs.mongodb.com/manual/reference/method/db.getSiblingDB', + link: 'https://mongodb.com/docs/manual/reference/method/db.getSiblingDB', description: 'Returns another database without modifying the db variable in the shell environment.', example: 'db.getSiblingDB(name)', }, getCollection: { - link: 'https://docs.mongodb.com/manual/reference/method/db.getCollection', + link: 'https://mongodb.com/docs/manual/reference/method/db.getCollection', description: 'Returns a collection or a view object that is functionally equivalent to using the db..', example: 'db.getCollection(name)', }, getMongo: { - link: 'https://docs.mongodb.com/manual/reference/method/db.getMongo/', + link: 'https://mongodb.com/docs/manual/reference/method/db.getMongo/', description: 'Returns the current database connection', example: 'connection = db.getMongo()', }, getName: { - link: 'https://docs.mongodb.com/manual/reference/method/db.getName', + link: 'https://mongodb.com/docs/manual/reference/method/db.getName', description: 'Returns the name of the DB', example: 'db.getName()', }, createCollection: { - link: 'https://docs.mongodb.com/manual/reference/method/db.createCollection/', + link: 'https://mongodb.com/docs/manual/reference/method/db.createCollection/', description: 'Create new collection', example: "db.createCollection('collName')", }, createEncryptedCollection: { - link: 'https://docs.mongodb.com/manual/reference/method/db.createEncryptedCollection/', + link: 'https://mongodb.com/docs/manual/reference/method/db.createEncryptedCollection/', description: 'Creates a new collection with a list of encrypted fields each with unique and auto-created data encryption keys (DEKs). This is a utility function that internally utilises ClientEnryption.createEncryptedCollection.', example: 'db.createEncryptedCollection( "collName", { "provider": "", "createCollectionOptions": { "encryptedFields": { ... }, ... } })', }, createView: { - link: 'https://docs.mongodb.com/manual/reference/method/db.createView/', + link: 'https://mongodb.com/docs/manual/reference/method/db.createView/', description: 'Create new view', example: "db.createView('viewName', 'source', [])", }, createUser: { - link: 'https://docs.mongodb.com/manual/reference/method/db.createUser', + link: 'https://mongodb.com/docs/manual/reference/method/db.createUser', description: 'Creates a new user for the database on which the method is run. db.createUser() returns a duplicate user error if the user already exists on the database.', example: 'db.createUser(user, writeConcern)', }, updateUser: { - link: 'https://docs.mongodb.com/manual/reference/method/db.updateUser', + link: 'https://mongodb.com/docs/manual/reference/method/db.updateUser', description: 'Updates the user’s profile on the database on which you run the method. An update to a field completely replaces the previous field’s values. This includes updates to the user’s roles array.', example: 'db.updateUser(username, update, writeConcern)', }, changeUserPassword: { - link: 'https://docs.mongodb.com/manual/reference/method/db.changeUserPassword', + link: 'https://mongodb.com/docs/manual/reference/method/db.changeUserPassword', description: 'Updates a user’s password. Run the method in the database where the user is defined, i.e. the database you created the user.', example: 'db.changeUserPassword(username, password)', }, logout: { - link: 'https://docs.mongodb.com/manual/reference/method/db.logout', + link: 'https://mongodb.com/docs/manual/reference/method/db.logout', description: 'Ends the current authentication session. This function has no effect if the current session is not authenticated.', example: 'db.logout()', }, dropUser: { - link: 'https://docs.mongodb.com/manual/reference/method/db.dropUser', + link: 'https://mongodb.com/docs/manual/reference/method/db.dropUser', description: 'Removes the user from the current database.', example: 'db.dropUser(username, writeConcern)', }, dropAllUsers: { - link: 'https://docs.mongodb.com/manual/reference/method/db.dropAllUsers', + link: 'https://mongodb.com/docs/manual/reference/method/db.dropAllUsers', description: 'Removes all users from the current database.', example: 'db.dropAllUsers(writeConcern)', }, auth: { - link: 'https://docs.mongodb.com/manual/reference/method/db.auth', + link: 'https://mongodb.com/docs/manual/reference/method/db.auth', description: 'Allows a user to authenticate to the database from within the shell.', example: 'db.auth(username, password)', }, grantRolesToUser: { - link: 'https://docs.mongodb.com/manual/reference/method/db.grantRolesToUser', + link: 'https://mongodb.com/docs/manual/reference/method/db.grantRolesToUser', description: 'Grants additional roles to a user.', example: 'db.grantRolesToUser( "", [ ], { } )', }, revokeRolesFromUser: { - link: 'https://docs.mongodb.com/manual/reference/method/db.revokeRolesFromUser', + link: 'https://mongodb.com/docs/manual/reference/method/db.revokeRolesFromUser', description: 'Removes a one or more roles from a user on the current database.', example: 'db.revokeRolesFromUser( "", [ ], { } )', }, getUser: { - link: 'https://docs.mongodb.com/manual/reference/method/db.getUser', + link: 'https://mongodb.com/docs/manual/reference/method/db.getUser', description: 'Returns user information for a specified user. Run this method on the user’s database. The user must exist on the database on which the method runs.', example: 'db.getUser(username, args)', }, getUsers: { - link: 'https://docs.mongodb.com/manual/reference/method/db.getUsers', + link: 'https://mongodb.com/docs/manual/reference/method/db.getUsers', description: 'Returns information for all the users in the database.', example: 'db.getUsers()', }, createRole: { - link: 'https://docs.mongodb.com/manual/reference/method/db.createRole', + link: 'https://mongodb.com/docs/manual/reference/method/db.createRole', description: 'Creates a new role.', example: 'db.createRole(role, writeConcern)', }, updateRole: { - link: 'https://docs.mongodb.com/manual/reference/method/db.updateRole', + link: 'https://mongodb.com/docs/manual/reference/method/db.updateRole', description: 'Updates the role’s profile on the database on which you run the method. An update to a field completely replaces the previous field’s values.', example: 'db.updateRole(rolename, update, writeConcern)', }, dropRole: { - link: 'https://docs.mongodb.com/manual/reference/method/db.dropRole', + link: 'https://mongodb.com/docs/manual/reference/method/db.dropRole', description: 'Removes the role from the current database.', example: 'db.dropRole(rolename, writeConcern)', }, dropAllRoles: { - link: 'https://docs.mongodb.com/manual/reference/method/db.dropAllRoles', + link: 'https://mongodb.com/docs/manual/reference/method/db.dropAllRoles', description: 'Removes all roles from the current database.', example: 'db.dropAllRoles(writeConcern)', }, grantRolesToRole: { - link: 'https://docs.mongodb.com/manual/reference/method/db.grantRolesToRole', + link: 'https://mongodb.com/docs/manual/reference/method/db.grantRolesToRole', description: 'Grants additional roles to a role.', example: 'db.grantRolesToRole( "", [ ], { } )', }, revokeRolesFromRole: { - link: 'https://docs.mongodb.com/manual/reference/method/db.revokeRolesFromRole', + link: 'https://mongodb.com/docs/manual/reference/method/db.revokeRolesFromRole', description: 'Removes a one or more roles from a role on the current database.', example: 'db.revokeRolesFromRole( "", [ ], { } )', }, grantPrivilegesToRole: { - link: 'https://docs.mongodb.com/manual/reference/method/db.grantPrivilegesToRole', + link: 'https://mongodb.com/docs/manual/reference/method/db.grantPrivilegesToRole', description: 'Grants additional privileges to a role.', example: 'db.grantPrivilegesToRole( "", [ ], { } )', }, revokePrivilegesFromRole: { - link: 'https://docs.mongodb.com/manual/reference/method/db.revokePrivilegesFromRole', + link: 'https://mongodb.com/docs/manual/reference/method/db.revokePrivilegesFromRole', description: 'Removes a one or more privileges from a role on the current database.', example: 'db.revokeRolesFromRole( "", [ ], { } )', }, getRole: { - link: 'https://docs.mongodb.com/manual/reference/method/db.getRole', + link: 'https://mongodb.com/docs/manual/reference/method/db.getRole', description: 'Returns role information for a specified role. Run this method on the role’s database. The role must exist on the database on which the method runs.', example: 'db.getRole(rolename, args)', }, getRoles: { - link: 'https://docs.mongodb.com/manual/reference/method/db.getRoles', + link: 'https://mongodb.com/docs/manual/reference/method/db.getRoles', description: 'Returns information for all the roles in the database.', example: 'db.getRoles()', }, currentOp: { - link: 'https://docs.mongodb.com/manual/reference/method/db.currentOp', + link: 'https://mongodb.com/docs/manual/reference/method/db.currentOp', description: 'Runs an aggregation using $currentOp operator. Returns a document that contains information on in-progress operations for the database instance. For further information, see $currentOp.', example: 'db.currentOp()', }, killOp: { - link: 'https://docs.mongodb.com/manual/reference/method/db.killOp', + link: 'https://mongodb.com/docs/manual/reference/method/db.killOp', description: 'Calls the killOp command. Terminates an operation as specified by the operation ID. To find operations and their corresponding IDs, see $currentOp or db.currentOp().', example: 'db.killOp()', }, shutdownServer: { - link: 'https://docs.mongodb.com/manual/reference/method/db.shutdownServer', + link: 'https://mongodb.com/docs/manual/reference/method/db.shutdownServer', description: 'Calls the shutdown command. Shuts down the current mongod or mongos process cleanly and safely. You must issue the db.shutdownServer() operation against the admin database.', example: 'db.shutdownServer()', }, fsyncLock: { - link: 'https://docs.mongodb.com/manual/reference/method/db.fsyncLock', + link: 'https://mongodb.com/docs/manual/reference/method/db.fsyncLock', description: 'Calls the fsync command. Forces the mongod to flush all pending write operations to disk and locks the entire mongod instance to prevent additional writes until the user releases the lock with a corresponding db.fsyncUnlock() command.', example: 'db.fsyncLock()', }, fsyncUnlock: { - link: 'https://docs.mongodb.com/manual/reference/method/db.fsyncUnlock', + link: 'https://mongodb.com/docs/manual/reference/method/db.fsyncUnlock', description: 'Calls the fsyncUnlock command. Reduces the lock taken by db.fsyncLock() on a mongod instance by 1.', example: 'db.fsyncUnlock()', }, version: { - link: 'https://docs.mongodb.com/manual/reference/method/db.version', + link: 'https://mongodb.com/docs/manual/reference/method/db.version', description: 'returns the db version. uses the buildinfo command', example: 'db.version()', }, serverBits: { - link: 'https://docs.mongodb.com/manual/reference/method/db.serverBits', + link: 'https://mongodb.com/docs/manual/reference/method/db.serverBits', description: 'returns the db serverBits. uses the buildInfo command', example: 'db.serverBits()', }, isMaster: { - link: 'https://docs.mongodb.com/manual/reference/method/db.isMaster', + link: 'https://mongodb.com/docs/manual/reference/method/db.isMaster', description: 'Calls the isMaster command', example: 'db.isMaster()', }, hello: { - link: 'https://docs.mongodb.com/manual/reference/method/db.hello', + link: 'https://mongodb.com/docs/manual/reference/method/db.hello', description: 'Calls the hello command', example: 'db.hello()', }, rotateCertificates: { - link: 'https://docs.mongodb.com/manual/reference/method/db.rotateCertificates', + link: 'https://mongodb.com/docs/manual/reference/method/db.rotateCertificates', description: 'Calls the rotateCertificates command', example: 'db.rotateCertificates()', }, serverBuildInfo: { - link: 'https://docs.mongodb.com/manual/reference/method/db.serverBuildInfo', + link: 'https://mongodb.com/docs/manual/reference/method/db.serverBuildInfo', description: 'returns the db serverBuildInfo. uses the buildInfo command', example: 'db.serverBuildInfo()', }, serverStatus: { - link: 'https://docs.mongodb.com/manual/reference/method/db.serverStatus', + link: 'https://mongodb.com/docs/manual/reference/method/db.serverStatus', description: 'returns the server stats. uses the serverStatus command', example: 'db.serverStatus()', }, stats: { - link: 'https://docs.mongodb.com/manual/reference/method/db.stats', + link: 'https://mongodb.com/docs/manual/reference/method/db.stats', description: 'returns the db stats. uses the dbStats command', example: 'db.stats() or db.stats({ scale: })', }, hostInfo: { - link: 'https://docs.mongodb.com/manual/reference/method/db.hostInfo', + link: 'https://mongodb.com/docs/manual/reference/method/db.hostInfo', description: 'Calls the hostInfo command', example: 'db.hostInfo()', }, serverCmdLineOpts: { - link: 'https://docs.mongodb.com/manual/reference/method/db.serverCmdLineOpts', + link: 'https://mongodb.com/docs/manual/reference/method/db.serverCmdLineOpts', description: 'returns the db serverCmdLineOpts. uses the getCmdLineOpts command', example: 'db.serverCmdLineOpts()', }, printCollectionStats: { - link: 'https://docs.mongodb.com/manual/reference/method/db.printCollectionStats', + link: 'https://mongodb.com/docs/manual/reference/method/db.printCollectionStats', description: 'Prints the collection.stats for each collection in the db.', example: 'db.printCollectionStats(scale)', }, getProfilingStatus: { - link: 'https://docs.mongodb.com/manual/reference/method/db.getProfilingStatus', + link: 'https://mongodb.com/docs/manual/reference/method/db.getProfilingStatus', description: 'returns the db getProfilingStatus. uses the profile command', example: 'db.getProfilingStatus()', }, setProfilingLevel: { - link: 'https://docs.mongodb.com/manual/reference/method/db.setProfilingLevel', + link: 'https://mongodb.com/docs/manual/reference/method/db.setProfilingLevel', description: 'returns the db setProfilingLevel. uses the profile command', example: 'db.setProfilingLevel(level, )', }, setLogLevel: { - link: 'https://docs.mongodb.com/manual/reference/method/db.setLogLevel', + link: 'https://mongodb.com/docs/manual/reference/method/db.setLogLevel', description: 'returns the db setLogLevel. uses the setParameter command', example: 'db.setLogLevel(logLevel, )', }, getLogComponents: { - link: 'https://docs.mongodb.com/manual/reference/method/db.getLogComponents', + link: 'https://mongodb.com/docs/manual/reference/method/db.getLogComponents', description: 'returns the db getLogComponents. uses the getParameter command', example: 'db.getLogComponents()', }, cloneDatabase: { - link: 'https://docs.mongodb.com/manual/reference/method/db.cloneDatabase', + link: 'https://mongodb.com/docs/manual/reference/method/db.cloneDatabase', description: 'deprecated, non-functional', }, copyDatabase: { - link: 'https://docs.mongodb.com/manual/reference/method/db.copyDatabase', + link: 'https://mongodb.com/docs/manual/reference/method/db.copyDatabase', description: 'deprecated, non-functional', }, cloneCollection: { - link: 'https://docs.mongodb.com/manual/reference/method/db.cloneCollection', + link: 'https://mongodb.com/docs/manual/reference/method/db.cloneCollection', description: 'deprecated, non-functional', }, listCommands: { - link: 'https://docs.mongodb.com/manual/reference/method/db.listCommands', + link: 'https://mongodb.com/docs/manual/reference/method/db.listCommands', description: 'Calls the listCommands command', example: 'db.listCommands()', }, commandHelp: { - link: 'https://docs.mongodb.com/manual/reference/method/db.commandHelp', + link: 'https://mongodb.com/docs/manual/reference/method/db.commandHelp', description: 'returns the db commandHelp. uses the passed in command with help: true', example: 'db.commandHelp()', }, getLastError: { - link: 'https://docs.mongodb.com/manual/reference/method/db.getLastError', + link: 'https://mongodb.com/docs/manual/reference/method/db.getLastError', description: 'Calls the getLastError command', example: 'db.getLastError(, )', }, getLastErrorObj: { - link: 'https://docs.mongodb.com/manual/reference/method/db.getLastErrorObj', + link: 'https://mongodb.com/docs/manual/reference/method/db.getLastErrorObj', description: 'Calls the getLastError command', example: 'db.getLastErrorObj(, , )', }, printShardingStatus: { - link: 'https://docs.mongodb.com/manual/reference/method/db.printShardingStatus', + link: 'https://mongodb.com/docs/manual/reference/method/db.printShardingStatus', description: 'Calls sh.status(verbose)', example: 'db.printShardingStatus(verbose?)', }, printSecondaryReplicationInfo: { - link: 'https://docs.mongodb.com/manual/reference/method/db.printSecondaryReplicationInfo', + link: 'https://mongodb.com/docs/manual/reference/method/db.printSecondaryReplicationInfo', description: 'Prints secondary replicaset information', example: 'db.printSecondaryReplicationInfo()', }, printSlaveReplicationInfo: { - link: 'https://docs.mongodb.com/manual/reference/method/db.printSlaveReplicationInfo', + link: 'https://mongodb.com/docs/manual/reference/method/db.printSlaveReplicationInfo', description: 'DEPRECATED. Use db.printSecondaryReplicationInfo', example: 'db.printSlaveReplicationInfo()', }, getReplicationInfo: { - link: 'https://docs.mongodb.com/manual/reference/method/db.getReplicationInfo', + link: 'https://mongodb.com/docs/manual/reference/method/db.getReplicationInfo', description: 'Returns replication information', example: 'db.getReplicationInfo()', }, printReplicationInfo: { - link: 'https://docs.mongodb.com/manual/reference/method/db.printReplicationInfo', + link: 'https://mongodb.com/docs/manual/reference/method/db.printReplicationInfo', description: 'Formats sh.getReplicationInfo', example: 'db.printReplicationInfo()', }, @@ -1649,7 +1649,7 @@ const translations: Catalog = { 'This method is deprecated. Use db.getMongo().setReadPref() instead', }, checkMetadataConsistency: { - link: 'https://docs.mongodb.com/manual/reference/method/db.checkMetadataConsistency', + link: 'https://mongodb.com/docs/manual/reference/method/db.checkMetadataConsistency', description: 'Returns a cursor with information about metadata inconsistencies', example: 'db.checkMetadataConsistency()', @@ -1668,68 +1668,68 @@ const translations: Catalog = { description: 'Explainable Class', attributes: { aggregate: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.explain', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.explain', description: 'Provides information on the query plan for db.collection.aggregate() method.', example: 'db.coll.explain().aggregate()', }, find: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.explain', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.explain', description: 'Returns information on the query plan.', example: 'db.coll.explain().find()', }, count: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.explain', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.explain', description: 'Returns information on the query plan for db.collection.count().', example: 'db.coll.explain().count()', }, remove: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.explain', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.explain', description: 'Returns information on the query plan for db.collection.remove().', example: 'db.coll.explain().remove({})', }, update: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.explain', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.explain', description: 'Returns information on the query plan for db.collection.update().', example: 'db.coll.explain().update({}, { $inc: ${ a: 1 } })', }, distinct: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.explain', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.explain', description: 'Returns information on the query plan for db.collection.distinct().', example: 'db.coll.explain().distinct("_id")', }, mapReduce: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.explain', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.explain', description: 'Returns information on the query plan for db.collection.mapReduce().', example: 'db.coll.explain().mapReduce(map, reduce, options)', }, findAndModify: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.explain', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.explain', description: 'Returns information on the query plan for db.collection.findAndModify().', example: 'db.coll.explain().findAndModify({ query: { ... }, update: { ... } })', }, findOneAndDelete: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.explain', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.explain', description: 'Returns information on the query plan for db.collection.findOneAndDelete().', example: 'db.coll.explain().findOneAndDelete({ ... query ... })', }, findOneAndReplace: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.explain', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.explain', description: 'Returns information on the query plan for db.collection.findOneAndReplace().', example: 'db.coll.explain().findOneAndReplace({ ... query ... }, { ... replacement ... })', }, findOneAndUpdate: { - link: 'https://docs.mongodb.com/manual/reference/method/db.collection.explain', + link: 'https://mongodb.com/docs/manual/reference/method/db.collection.explain', description: 'Returns information on the query plan for db.collection.findOneAndUpdate().', example: @@ -1772,51 +1772,51 @@ const translations: Catalog = { 'Specifies the number of documents to return in each batch of the response from the MongoDB instance.', }, close: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.close', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.close', description: 'Instructs the server to close a cursor and free associated server resources. The server will automatically close cursors that have no remaining results, as well as cursors that have been idle for a period of time and lack the cursor.noCursorTimeout() option.', }, forEach: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.forEach', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.forEach', description: 'Iterates the cursor to apply a JavaScript function to each document from the cursor.', }, hasNext: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.hasNext', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.hasNext', description: "cursor.hasNext() returns true if the cursor returned by the db.collection.aggregate() can iterate further to return more documents. NOTE: if the cursor is tailable with awaitData then hasNext will block until a document is returned. To check if a document is in the cursor's batch without waiting, use tryNext instead", }, isClosed: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.isClosed', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.isClosed', description: 'Returns true if the cursor is closed.', }, isExhausted: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.isExhausted', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.isExhausted', description: 'cursor.isExhausted() returns true if the cursor is closed and there are no remaining objects in the batch.', }, itcount: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.itcount', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.itcount', description: 'Counts the number of documents remaining in a cursor. itcount() is similar to cursor.count(), but actually executes the query on an existing iterator, exhausting its contents in the process.', }, map: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.map', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.map', description: 'Applies the first argument, a function, to each document visited by the cursor and collects the return values from successive application into an array.', }, maxTimeMS: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.maxTimeMS', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.maxTimeMS', description: 'Specifies a cumulative time limit in milliseconds for processing operations on a cursor.', }, next: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.next', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.next', description: "The next document in the cursor returned by the db.collection.aggregate() method. NOTE: if the cursor is tailable with awaitData then next will block until a document is returned. To check if a document is in the cursor's batch without waiting, use tryNext instead", }, objsLeftInBatch: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.objsLeftInBatch', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.objsLeftInBatch', description: 'cursor.objsLeftInBatch() returns the number of documents remaining in the current batch.', }, @@ -1825,7 +1825,7 @@ const translations: Catalog = { 'Deprecated. The shell provides auto-formatting so this method is no longer useful', }, toArray: { - link: 'https://docs.mongodb.com/manual/reference/method/cursor.toArray', + link: 'https://mongodb.com/docs/manual/reference/method/cursor.toArray', description: 'The toArray() method returns an array that contains all the documents from a cursor. The method iterates completely the cursor, loading all the documents into RAM and exhausting the cursor.', }, @@ -1839,96 +1839,96 @@ const translations: Catalog = { ReplicaSet: { help: { description: 'Replica Set Class', - link: 'https://docs.mongodb.com/manual/reference/method/js-replication/', + link: 'https://mongodb.com/docs/manual/reference/method/js-replication/', attributes: { initiate: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.initiate', + link: 'https://mongodb.com/docs/manual/reference/method/rs.initiate', description: 'Initiates the replica set.', example: 'rs.initiate()', }, config: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.conf', + link: 'https://mongodb.com/docs/manual/reference/method/rs.conf', description: 'Returns a document that contains the current replica set configuration.', example: 'rs.config()', }, reconfig: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.reconfig', + link: 'https://mongodb.com/docs/manual/reference/method/rs.reconfig', description: 'Reconfigures an existing replica set, overwriting the existing replica set configuration.', example: 'rs.reconfig()', }, reconfigForPSASet: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.reconfigForPSASet', + link: 'https://mongodb.com/docs/manual/reference/method/rs.reconfigForPSASet', description: 'Reconfigures an existing replica set, overwriting the existing replica set configuration, if the reconfiguration is a transition from a Primary-Arbiter to a Primary-Secondary-Arbiter set.', example: 'rs.reconfigForPSASet(indexOfNewMemberInMembersArray, config)', }, conf: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.conf', + link: 'https://mongodb.com/docs/manual/reference/method/rs.conf', description: 'Calls replSetConfig', example: 'rs.conf()', }, status: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.status', + link: 'https://mongodb.com/docs/manual/reference/method/rs.status', description: 'Calls replSetGetStatus', example: 'rs.status()', }, isMaster: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.isMaster', + link: 'https://mongodb.com/docs/manual/reference/method/rs.isMaster', description: 'Calls isMaster', example: 'rs.isMaster()', }, hello: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.hello', + link: 'https://mongodb.com/docs/manual/reference/method/rs.hello', description: 'Calls hello', example: 'rs.hello()', }, printSecondaryReplicationInfo: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.printSecondaryReplicationInfo', + link: 'https://mongodb.com/docs/manual/reference/method/rs.printSecondaryReplicationInfo', description: 'Calls db.printSecondaryReplicationInfo', example: 'rs.printSecondaryReplicationInfo()', }, printSlaveReplicationInfo: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.printSlaveReplicationInfo', + link: 'https://mongodb.com/docs/manual/reference/method/rs.printSlaveReplicationInfo', description: 'DEPRECATED. Use rs.printSecondaryReplicationInfo', example: 'rs.printSlaveReplicationInfo()', }, printReplicationInfo: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.printReplicationInfo', + link: 'https://mongodb.com/docs/manual/reference/method/rs.printReplicationInfo', description: 'Calls db.printReplicationInfo', example: 'rs.printReplicationInfo()', }, add: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.add', + link: 'https://mongodb.com/docs/manual/reference/method/rs.add', description: 'Adds replica set member to replica set.', example: 'rs.add(hostport, arbiterOnly?)', }, addArb: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.addArb', + link: 'https://mongodb.com/docs/manual/reference/method/rs.addArb', description: 'Calls rs.add with arbiterOnly=true', example: 'rs.addArb(hostname)', }, remove: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.remove', + link: 'https://mongodb.com/docs/manual/reference/method/rs.remove', description: 'Removes a replica set member.', example: 'rs.remove(hostname)', }, freeze: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.freeze', + link: 'https://mongodb.com/docs/manual/reference/method/rs.freeze', description: 'Prevents the current member from seeking election as primary for a period of time. Uses the replSetFreeze command', example: 'rs.freeze(secs)', }, stepDown: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.stepDown', + link: 'https://mongodb.com/docs/manual/reference/method/rs.stepDown', description: 'Causes the current primary to become a secondary which forces an election. If no stepDownSecs is provided, uses 60 seconds. Uses the replSetStepDown command', example: 'rs.stepDown(stepDownSecs?, catchUpSecs?)', }, syncFrom: { - link: 'https://docs.mongodb.com/manual/reference/method/rs.syncFrom', + link: 'https://mongodb.com/docs/manual/reference/method/rs.syncFrom', description: 'Sets the member that this replica set member will sync from, overriding the default sync target selection logic.', example: 'rs.syncFrom(host)', @@ -1945,175 +1945,175 @@ const translations: Catalog = { description: 'The Shard Class', attributes: { enableSharding: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.enableSharding', + link: 'https://mongodb.com/docs/manual/reference/method/sh.enableSharding', description: 'Enables sharding on a specific database. Uses the enableSharding command', example: 'sh.enableSharding(database, primaryShard?)', }, shardCollection: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.shardCollection', + link: 'https://mongodb.com/docs/manual/reference/method/sh.shardCollection', description: 'Enables sharding for a collection. Uses the shardCollection command', example: 'sh.shardCollection(namespace, key, unique?, options?)', }, reshardCollection: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.reshardCollection', + link: 'https://mongodb.com/docs/manual/reference/method/sh.reshardCollection', description: 'Enables sharding for a collection. Uses the reshardCollection command', example: 'sh.reshardCollection(namespace, key, unique?, options?)', }, commitReshardCollection: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.commitReshardCollection', + link: 'https://mongodb.com/docs/manual/reference/method/sh.commitReshardCollection', description: 'Commits the current reshardCollection on a given collection', example: 'sh.commitReshardCollection(namespace)', }, abortReshardCollection: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.abortReshardCollection', + link: 'https://mongodb.com/docs/manual/reference/method/sh.abortReshardCollection', description: 'Abort the current reshardCollection on a given collection', example: 'sh.abortReshardCollection(namespace)', }, status: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.status', + link: 'https://mongodb.com/docs/manual/reference/method/sh.status', description: 'Prints a formatted report of the sharding configuration and the information regarding existing chunks in a sharded cluster. The default behavior suppresses the detailed chunk information if the total number of chunks is greater than or equal to 20.', example: 'sh.status(verbose?)', }, addShard: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.addShard', + link: 'https://mongodb.com/docs/manual/reference/method/sh.addShard', description: 'Adds a shard to a sharded cluster. Uses the addShard command', example: 'sh.addShard(url)', }, addShardToZone: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.addShardToZone', + link: 'https://mongodb.com/docs/manual/reference/method/sh.addShardToZone', description: 'Associates a shard to a zone. Uses the addShardToZone command', example: 'sh.addShardToZone(shard, zone)', }, addShardTag: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.addShardTag', + link: 'https://mongodb.com/docs/manual/reference/method/sh.addShardTag', description: '3.4+ only. Calls addShardTag for a sharded DB. Aliases to sh.addShardToZone().', example: 'sh.addShardTag(shard, tag)', }, updateZoneKeyRange: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.updateZoneKeyRange', + link: 'https://mongodb.com/docs/manual/reference/method/sh.updateZoneKeyRange', description: 'Associates a range of shard keys to a zone. Uses the updateZoneKeyRange command', example: 'sh.updateZoneKeyRange(ns, min, max, zone)', }, addTagRange: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.addTagRange', + link: 'https://mongodb.com/docs/manual/reference/method/sh.addTagRange', description: '3.4+ only. Adds a tag range for a sharded DB. This method aliases to sh.updateZoneKeyRange()', example: 'sh.addTagRange(ns, min, max, zone)', }, removeRangeFromZone: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.removeRangeFromZone', + link: 'https://mongodb.com/docs/manual/reference/method/sh.removeRangeFromZone', description: '3.4+ only. Removes an association between a range of shard keys and a zone.', example: 'sh.removeRangeFromZone(ns, min, max)', }, removeTagRange: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.removeTagRange', + link: 'https://mongodb.com/docs/manual/reference/method/sh.removeTagRange', description: '3.4+ only. Removes tag range for a sharded DB. Aliases to sh.removeRangeFromZone', example: 'sh.removeTagRange(ns, min, max)', }, removeShardFromZone: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.removeShardFromZone', + link: 'https://mongodb.com/docs/manual/reference/method/sh.removeShardFromZone', description: '3.4+ only. Removes the association between a shard and a zone. Uses the removeShardFromZone command', example: 'sh.removeShardFromZone(shard, zone)', }, removeShardTag: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.removeShardTag', + link: 'https://mongodb.com/docs/manual/reference/method/sh.removeShardTag', description: '3.4+ only. Removes a shard tag for a sharded DB. Aliases to sh.removeShardFromZone', example: 'sh.removeShardTag(shard, zone)', }, enableAutoSplit: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.enableAutoSplit', + link: 'https://mongodb.com/docs/manual/reference/method/sh.enableAutoSplit', description: 'Enables auto-splitting for the sharded cluster. Calls update on the config.settings collection', example: 'sh.enableAutoSplit()', }, disableAutoSplit: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.disableAutoSplit', + link: 'https://mongodb.com/docs/manual/reference/method/sh.disableAutoSplit', description: 'Disables auto-splitting for the sharded cluster. Calls update on the config.settings collection', example: 'sh.disableAutoSplit()', }, splitAt: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.splitAt', + link: 'https://mongodb.com/docs/manual/reference/method/sh.splitAt', description: 'Divides an existing chunk into two chunks using a specific value of the shard key as the dividing point. Uses the split command', example: 'sh.splitAt(ns, query)', }, splitFind: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.splitFind', + link: 'https://mongodb.com/docs/manual/reference/method/sh.splitFind', description: 'Splits a chunk at the shard key value specified by the query at the median. Uses the split command', example: 'sh.splitFind(ns, query)', }, moveChunk: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.moveChunk', + link: 'https://mongodb.com/docs/manual/reference/method/sh.moveChunk', description: 'Moves the chunk that contains the document specified by the query to the destination shard. Uses the moveChunk command', example: 'sh.moveChunk(ns, query, destination)', }, moveRange: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.moveRange', + link: 'https://mongodb.com/docs/manual/reference/method/sh.moveRange', description: 'Moves a range of documents specified by the min and max keys to the destination shard. Uses the moveRange command', example: 'sh.moveRange(ns, toShard, min?, max?)', }, balancerCollectionStatus: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.balancerCollectionStatus', + link: 'https://mongodb.com/docs/manual/reference/method/sh.balancerCollectionStatus', description: 'Returns information on whether the chunks of a sharded collection are balanced. Uses the balancerCollectionStatus command', example: 'sh.balancerCollectionStatus(ns)', }, enableBalancing: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.enableBalancing', + link: 'https://mongodb.com/docs/manual/reference/method/sh.enableBalancing', description: 'Activates the sharded collection balancer process.', example: 'sh.enableBalancing(ns)', }, disableBalancing: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.disableBalancing', + link: 'https://mongodb.com/docs/manual/reference/method/sh.disableBalancing', description: 'Disable balancing on a single collection in a sharded database. Does not affect balancing of other collections in a sharded cluster.', example: 'sh.disableBalancing(ns)', }, getBalancerState: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.getBalancerState', + link: 'https://mongodb.com/docs/manual/reference/method/sh.getBalancerState', description: 'Returns true when the balancer is enabled and false if the balancer is disabled. This does not reflect the current state of balancing operations: use sh.isBalancerRunning() to check the balancer’s current state.', example: 'sh.getBalancerState()', }, isBalancerRunning: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.isBalancerRunning', + link: 'https://mongodb.com/docs/manual/reference/method/sh.isBalancerRunning', description: 'Returns true if the balancer process is currently running and migrating chunks and false if the balancer process is not running. Uses the balancerStatus command', example: 'sh.isBalancerRunning()', }, startBalancer: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.startBalancer', + link: 'https://mongodb.com/docs/manual/reference/method/sh.startBalancer', description: 'Enables the balancer. Uses the balancerStart command', example: 'sh.startBalancer(timeout)', }, stopBalancer: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.stopBalancer', + link: 'https://mongodb.com/docs/manual/reference/method/sh.stopBalancer', description: 'Disables the balancer. uses the balancerStop command', example: 'sh.stopBalancer(timeout)', }, setBalancerState: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.setBalancerState', + link: 'https://mongodb.com/docs/manual/reference/method/sh.setBalancerState', description: 'Calls sh.startBalancer if state is true, otherwise calls sh.stopBalancer', example: 'sh.setBalancerState(state)', @@ -2124,33 +2124,33 @@ const translations: Catalog = { example: 'sh.getShardedDataDistribution()', }, startAutoMerger: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.startAutoMerger', + link: 'https://mongodb.com/docs/manual/reference/method/sh.startAutoMerger', description: 'Globally enable auto-merger (active only if balancer is up)', example: 'sh.startAutoMerger()', }, stopAutoMerger: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.stopAutoMerger', + link: 'https://mongodb.com/docs/manual/reference/method/sh.stopAutoMerger', description: 'Globally disable auto-merger', example: 'sh.stopAutoMerger()', }, isAutoMergerEnabled: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.isAutoMergerEnabled', + link: 'https://mongodb.com/docs/manual/reference/method/sh.isAutoMergerEnabled', description: 'Returns whether the auto-merger is enabled', example: 'sh.isAutoMergerEnabled()', }, disableAutoMerger: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.disableAutoMerger', + link: 'https://mongodb.com/docs/manual/reference/method/sh.disableAutoMerger', description: 'Disable auto-merging on one collection', example: 'sh.disableAutoMerger(ns)', }, enableAutoMerger: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.enableAutoMerger', + link: 'https://mongodb.com/docs/manual/reference/method/sh.enableAutoMerger', description: 'Re-enable auto-merge on one collection', example: 'sh.enableAutoMerger(ns)', }, checkMetadataConsistency: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.checkMetadataConsistency', + link: 'https://mongodb.com/docs/manual/reference/method/sh.checkMetadataConsistency', description: 'Returns a cursor with information about metadata inconsistencies', example: 'sh.checkMetadataConsistency()', @@ -2162,37 +2162,37 @@ const translations: Catalog = { 'sh.shardAndDistributeCollection(ns, key, unique?, options?)', }, moveCollection: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.moveCollection', + link: 'https://mongodb.com/docs/manual/reference/method/sh.moveCollection', description: 'Moves a single unsharded collection to a different shard.', example: 'sh.moveCollection(ns, toShard)', }, abortMoveCollection: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.abortMoveCollection', + link: 'https://mongodb.com/docs/manual/reference/method/sh.abortMoveCollection', description: 'Abort the current moveCollection operation on a given collection', example: 'sh.abortMoveCollection(ns)', }, unshardCollection: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.unshardCollection', + link: 'https://mongodb.com/docs/manual/reference/method/sh.unshardCollection', description: 'Unshard the given collection and move all data to the given shard.', example: 'sh.unshardCollection(ns, toShard)', }, abortUnshardCollection: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.abortUnshardCollection', + link: 'https://mongodb.com/docs/manual/reference/method/sh.abortUnshardCollection', description: 'Abort the current unshardCollection operation on a given collection', example: 'sh.abortUnshardCollection(ns)', }, listShards: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.listShards', + link: 'https://mongodb.com/docs/manual/reference/method/sh.listShards', description: 'Returns a list of the configured shards in a sharded cluster', example: 'sh.listShards()', }, isConfigShardEnabled: { - link: 'https://docs.mongodb.com/manual/reference/method/sh.isConfigShardEnabled', + link: 'https://mongodb.com/docs/manual/reference/method/sh.isConfigShardEnabled', description: 'Returns a document with an `enabled: ` field indicating whether the cluster is configured as embedded config server cluster. If it is, then the config shard host and tags are also returned.', example: 'sh.isConfigShardEnabled()', @@ -2203,55 +2203,55 @@ const translations: Catalog = { Session: { help: { description: 'The Session Class. Represents a server session', - link: 'https://docs.mongodb.com/manual/reference/method/Session/', + link: 'https://mongodb.com/docs/manual/reference/method/Session/', attributes: { getDatabase: { - link: 'https://docs.mongodb.com/manual/reference/method/Session/#Session.getDatabase', + link: 'https://mongodb.com/docs/manual/reference/method/Session/#Session.getDatabase', description: 'Returns a database class that will pass the session to the server with every command', }, advanceOperationTime: { - link: 'https://docs.mongodb.com/manual/reference/method/Session/#Session.advanceOperationTime', + link: 'https://mongodb.com/docs/manual/reference/method/Session/#Session.advanceOperationTime', description: 'Updates the operation time', }, endSession: { - link: 'https://docs.mongodb.com/manual/reference/method/Session/#Session.endSession', + link: 'https://mongodb.com/docs/manual/reference/method/Session/#Session.endSession', description: 'Ends the session', }, hasEnded: { - link: 'https://docs.mongodb.com/manual/reference/method/Session/#Session.hasEnded', + link: 'https://mongodb.com/docs/manual/reference/method/Session/#Session.hasEnded', description: 'Returns a boolean that specifies whether the session has ended.', }, getClusterTime: { - link: 'https://docs.mongodb.com/manual/reference/method/Session/#Session.getClusterTime', + link: 'https://mongodb.com/docs/manual/reference/method/Session/#Session.getClusterTime', description: 'Returns the most recent cluster time as seen by the session. Applicable for replica sets and sharded clusters only.', }, getOperationTime: { - link: 'https://docs.mongodb.com/manual/reference/method/Session/#Session.getOperationTime', + link: 'https://mongodb.com/docs/manual/reference/method/Session/#Session.getOperationTime', description: 'Returns the timestamp of the last acknowledged operation for the session.', }, getOptions: { - link: 'https://docs.mongodb.com/manual/reference/method/Session/#Session.getOptions', + link: 'https://mongodb.com/docs/manual/reference/method/Session/#Session.getOptions', description: 'Returns the options object passed to startSession', }, startTransaction: { - link: 'https://docs.mongodb.com/manual/reference/method/Session.startTransaction/#Session.startTransaction', + link: 'https://mongodb.com/docs/manual/reference/method/Session.startTransaction/#Session.startTransaction', description: 'Starts a multi-document transaction for the session.', }, commitTransaction: { - link: 'https://docs.mongodb.com/manual/reference/method/Session.commitTransaction/#Session.commitTransaction', + link: 'https://mongodb.com/docs/manual/reference/method/Session.commitTransaction/#Session.commitTransaction', description: 'Commits the session’s transaction.', }, abortTransaction: { - link: 'https://docs.mongodb.com/manual/reference/method/Session.abortTransaction/#Session.abortTransaction', + link: 'https://mongodb.com/docs/manual/reference/method/Session.abortTransaction/#Session.abortTransaction', description: 'Aborts the session’s transaction.', }, withTransaction: { - link: 'https://docs.mongodb.com/manual/reference/method/Session.abortTransaction/#Session.withTransaction', + link: 'https://mongodb.com/docs/manual/reference/method/Session.abortTransaction/#Session.withTransaction', description: 'Run a function within a transaction context.', example: 'session.withTransaction(() => { session.getDatabase("test").test.insertOne({ doc: 1 }); })', @@ -2266,53 +2266,53 @@ const translations: Catalog = { Mongo: { help: { description: 'The Mongo Class. Represents a connection to a server', - link: 'https://docs.mongodb.com/manual/reference/method/Mongo/#Mongo', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo/#Mongo', attributes: { watch: { - link: 'https://docs.mongodb.com/manual/reference/method/Mongo.watch', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo.watch', description: 'Opens a change stream cursor on the connection', example: 'const cursor = db.getMongo().watch(pipeline, options)', }, startSession: { - link: 'https://docs.mongodb.com/manual/reference/method/Mongo.startSession/', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo.startSession/', description: 'Starts a session for the connection.', }, bulkWrite: { - link: 'https://docs.mongodb.com/manual/reference/method/Mongo.bulkWrite', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo.bulkWrite', description: 'Performs multiple write operations across databases and collections with controls for order of execution.', example: 'db.getMongo().bulkWrite(operations, options)', }, getCollection: { - link: 'https://docs.mongodb.com/manual/reference/method/Mongo.getCollection', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo.getCollection', description: 'Returns the specified Collection of the Mongo object.', example: 'const collection = db.getMongo().getCollection("databaseName.collectionName")', }, getDB: { - link: 'https://docs.mongodb.com/manual/reference/method/Mongo.getDB', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo.getDB', description: 'Returns the specified Database of the Mongo object.', }, getDBs: { - link: 'https://docs.mongodb.com/manual/reference/method/Mongo.getDBs', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo.getDBs', description: 'Returns information about all databases. Uses the listDatabases command.', }, getDBNames: { - link: 'https://docs.mongodb.com/manual/reference/method/Mongo.getDBs', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo.getDBs', description: 'Returns an array of all database names. Uses the listDatabases command.', example: 'db.getMongo().getDBNames().map(name => db.getSiblingDB(name).getCollectionNames())', }, getURI: { - link: 'https://docs.mongodb.com/manual/reference/method/Mongo.getURI', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo.getURI', description: 'Returns the connection string for current session', }, connect: { - link: 'https://docs.mongodb.com/manual/reference/method/connect', + link: 'https://mongodb.com/docs/manual/reference/method/connect', description: 'Creates a connection to a MongoDB instance and returns the reference to the database.', }, @@ -2321,44 +2321,44 @@ const translations: Catalog = { 'Closes a Mongo object, disposing of related resources and closing the underlying connection.', }, getReadConcern: { - link: 'https://docs.mongodb.com/manual/reference/method/Mongo.getReadConcern', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo.getReadConcern', description: 'Returns the ReadConcern set for the connection.', example: 'db.getMongo().getReadConcern()', }, getWriteConcern: { - link: 'https://docs.mongodb.com/manual/reference/method/Mongo.getWriteConcern', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo.getWriteConcern', description: 'Returns the WriteConcern set for the connection.', example: 'db.getMongo().getWriteConcern()', }, getReadPref: { - link: 'https://docs.mongodb.com/manual/reference/method/Mongo.getReadPref', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo.getReadPref', description: 'Returns the ReadPreference set for the connection.', example: 'db.getMongo().getReadPref()', }, getReadPrefMode: { - link: 'https://docs.mongodb.com/manual/reference/method/Mongo.getReadPrefMode', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo.getReadPrefMode', description: 'Returns the ReadPreference Mode set for the connection.', example: 'db.getMongo().getReadPrefMode()', }, getReadPrefTagSet: { - link: 'https://docs.mongodb.com/manual/reference/method/Mongo.getReadPrefTagSet', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo.getReadPrefTagSet', description: 'Returns the ReadPreference TagSet set for the connection.', example: 'db.getMongo().getReadPrefTagSet()', }, setReadPref: { - link: 'https://docs.mongodb.com/manual/reference/method/Mongo.setReadPref', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo.setReadPref', description: 'Sets the ReadPreference for the connection', example: 'db.getMongo().setReadPref(mode, tagSets, hedgeOptions)', }, setReadConcern: { - link: 'https://docs.mongodb.com/manual/reference/method/Mongo.setReadConcern', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo.setReadConcern', description: 'Sets the ReadConcern for the connection', example: 'db.getMongo().setReadConcern(level)', }, setWriteConcern: { - link: 'https://docs.mongodb.com/manual/reference/method/Mongo.setWriteConcern', + link: 'https://mongodb.com/docs/manual/reference/method/Mongo.setWriteConcern', description: 'Sets the WriteConcern for the connection', example: "db.getMongo().setWriteConcern('majority')", }, @@ -2380,12 +2380,12 @@ const translations: Catalog = { getKeyVault: { description: 'Returns the KeyVault object for the current database connection. The KeyVault object supports data encryption key management for Client-side field level encryption.', - link: 'https://docs.mongodb.com/manual/reference/method/getKeyVault/#getKeyVault', + link: 'https://mongodb.com/docs/manual/reference/method/getKeyVault/#getKeyVault', }, getClientEncryption: { description: 'Returns the ClientEncryption object for the current database collection. The ClientEncryption object supports explicit (manual) encryption and decryption of field values for Client-Side field level encryption.', - link: 'https://docs.mongodb.com/manual/reference/method/getClientEncryption/#getClientEncryption', + link: 'https://mongodb.com/docs/manual/reference/method/getClientEncryption/#getClientEncryption', }, convertShardKeyToHashed: { description: @@ -2592,38 +2592,38 @@ const translations: Catalog = { }, Bulk: { help: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk', description: 'Bulk operations builder used to construct a list of write operations to perform in bulk for a single collection. To instantiate the builder, use either the db.collection.initializeOrderedBulkOp() or the db.collection.initializeUnorderedBulkOp() method.', attributes: { insert: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.insert/', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.insert/', description: 'Adds an insert to the bulk operation.', example: 'db.insert()', }, execute: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.execute/', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.execute/', description: 'Executes the bulk operation.', example: 'bulkOp.execute()', }, find: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.find/', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.find/', description: 'Adds a find to the bulk operation.', example: 'bulkOp.find()', }, getOperations: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.getOperations/', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.getOperations/', description: 'Returns the batches executed by the bulk write.', example: 'bulkOp.getOperations()', }, tojson: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.tojson/', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.tojson/', description: 'Returns a JSON document that contains the number of operations and batches in the Bulk() object.', example: 'bulkOp.tojson()', }, toString: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.toString/', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.toString/', description: 'Returns as a string a JSON document that contains the number of operations and batches in the Bulk() object.', example: 'bulkOp.toString()', @@ -2633,61 +2633,61 @@ const translations: Catalog = { }, BulkFindOp: { help: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.find', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.find', description: 'Bulk operations builder returned after Bulk.find()', attributes: { arrayFilters: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.find.arrayFilters/', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.find.arrayFilters/', description: 'Adds an arrayFilter to the bulk operation.', example: 'bulkOp.find(...).arrayFilters()', }, collation: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.find.collation/', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.find.collation/', description: 'Adds collation options to the bulk operation.', example: 'bulkOp.find(...).collation()', }, remove: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.find.remove/', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.find.remove/', description: 'Adds an remove to the bulk operation.', example: 'bulkOp.find(...).remove()', }, removeOne: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.find.removeOne/', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.find.removeOne/', description: 'Adds an removeOne to the bulk operation.', example: 'bulkOp.find(...).removeOne()', }, delete: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.find.delete/', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.find.delete/', description: 'Adds an delete to the bulk operation.', example: 'bulkOp.find(...).delete()', }, deleteOne: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.find.deleteOne/', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.find.deleteOne/', description: 'Adds an deleteOne to the bulk operation.', example: 'bulkOp.find(...).deleteOne()', }, replaceOne: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.find.replaceOne/', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.find.replaceOne/', description: 'Adds an replaceOne to the bulk operation.', example: 'bulkOp.find(...).replaceOne()', }, updateOne: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.find.updateOne/', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.find.updateOne/', description: 'Adds an updateOne to the bulk operation.', example: 'bulkOp.find(...).updateOne()', }, update: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.find.update/', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.find.update/', description: 'Adds an update to the bulk operation.', example: 'bulkOp.find(...).update()', }, upsert: { - link: 'https://docs.mongodb.com/manual/reference/method/Bulk.find.upsert/', + link: 'https://mongodb.com/docs/manual/reference/method/Bulk.find.upsert/', description: 'Adds an upsert to the bulk operation updates for this find(...).', example: 'bulkOp.find(...).upsert()', @@ -2697,24 +2697,24 @@ const translations: Catalog = { }, PlanCache: { help: { - link: 'https://docs.mongodb.com/manual/reference/method/js-plan-cache/', + link: 'https://mongodb.com/docs/manual/reference/method/js-plan-cache/', description: 'An interface to access the query plan cache object and associated PlanCache methods for a collection.', attributes: { clear: { - link: 'https://docs.mongodb.com/manual/reference/method/PlanCache.clear', + link: 'https://mongodb.com/docs/manual/reference/method/PlanCache.clear', description: 'Removes cached query plan(s) for a collection.', example: 'db.coll.getPlanCache().clear()', }, clearPlansByQuery: { - link: 'https://docs.mongodb.com/manual/reference/method/PlanCache.clearPlansByQuery', + link: 'https://mongodb.com/docs/manual/reference/method/PlanCache.clearPlansByQuery', description: 'Removes cached query plan(s) for a collection of the specified query shape.', example: 'db.coll.getPlanCache().clearPlansByQuery(, , )', }, list: { - link: 'https://docs.mongodb.com/manual/reference/method/PlanCache.list', + link: 'https://mongodb.com/docs/manual/reference/method/PlanCache.list', description: 'Lists cached query plan(s) for a collection.', example: 'db.coll.getPlanCache().list()', }, @@ -2729,94 +2729,94 @@ const translations: Catalog = { }, Document: { help: { - link: 'https://docs.mongodb.com/manual/core/document/', + link: 'https://mongodb.com/docs/manual/core/document/', description: 'A generic MongoDB document, without any methods.', attributes: {}, }, }, KeyVault: { help: { - link: 'https://docs.mongodb.com/manual/core/security-client-side-encryption/', + link: 'https://mongodb.com/docs/manual/core/security-client-side-encryption/', description: 'The key vault object for the current MongoDB connection', attributes: { createKey: { description: 'Creates a data encryption key for use with client-side field level encryption.', - link: 'https://docs.mongodb.com/manual/reference/method/KeyVault.createKey/#KeyVault.createKey', + link: 'https://mongodb.com/docs/manual/reference/method/KeyVault.createKey/#KeyVault.createKey', }, deleteKey: { description: 'Deletes the specified data encryption key from the key vault.', - link: 'https://docs.mongodb.com/manual/reference/method/KeyVault.deleteKey/#KeyVault.deleteKey', + link: 'https://mongodb.com/docs/manual/reference/method/KeyVault.deleteKey/#KeyVault.deleteKey', }, getKey: { description: 'Retreives the specified data encryption key from the key vault.', - link: 'https://docs.mongodb.com/manual/reference/method/KeyVault.getKey/#KeyVault.getKey', + link: 'https://mongodb.com/docs/manual/reference/method/KeyVault.getKey/#KeyVault.getKey', }, getKeys: { description: 'Retrieves all keys in the key vault.', - link: 'https://docs.mongodb.com/manual/reference/method/KeyVault.getKeys/#KeyVault.getKeys', + link: 'https://mongodb.com/docs/manual/reference/method/KeyVault.getKeys/#KeyVault.getKeys', }, addKeyAlternateName: { description: 'Associates a key alternative name to the specified data encryption key.', - link: 'https://docs.mongodb.com/manual/reference/method/KeyVault.addKeyAlternateName/#KeyVault.addKeyAlternateName', + link: 'https://mongodb.com/docs/manual/reference/method/KeyVault.addKeyAlternateName/#KeyVault.addKeyAlternateName', }, removeKeyAlternateName: { description: 'Removes a key alternative name from the specified data encryption key.', - link: 'https://docs.mongodb.com/manual/reference/method/KeyVault.removeKeyAlternateName/#KeyVault.removeKeyAlternateName', + link: 'https://mongodb.com/docs/manual/reference/method/KeyVault.removeKeyAlternateName/#KeyVault.removeKeyAlternateName', }, getKeyByAltName: { description: 'Retrieves keys with the specified key alternative name.', - link: 'https://docs.mongodb.com/manual/reference/method/KeyVault.getKeyByAltName/#KeyVault.getKeyByAltName', + link: 'https://mongodb.com/docs/manual/reference/method/KeyVault.getKeyByAltName/#KeyVault.getKeyByAltName', }, rewrapManyDataKey: { description: 'Re-wrap one, more, or all data keys with another KMS provider, or re-wrap using the same one.', - link: 'https://docs.mongodb.com/manual/reference/method/KeyVault.rewrapManyDataKey/#KeyVault.rewrapManyDataKey', + link: 'https://mongodb.com/docs/manual/reference/method/KeyVault.rewrapManyDataKey/#KeyVault.rewrapManyDataKey', }, createDataKey: { description: 'Alias of KeyVault.createKey()', - link: 'https://docs.mongodb.com/manual/reference/method/KeyVault.createKey/#KeyVault.createKey', + link: 'https://mongodb.com/docs/manual/reference/method/KeyVault.createKey/#KeyVault.createKey', }, removeKeyAltName: { description: 'Alias of KeyVault.removeKeyAlternateName()', - link: 'https://docs.mongodb.com/manual/reference/method/KeyVault.removeKeyAlternateName/#KeyVault.removeKeyAlternateName', + link: 'https://mongodb.com/docs/manual/reference/method/KeyVault.removeKeyAlternateName/#KeyVault.removeKeyAlternateName', }, addKeyAltName: { description: 'Alias of KeyVault.addKeyAlternateName()', - link: 'https://docs.mongodb.com/manual/reference/method/KeyVault.addKeyAlternateName/#KeyVault.addKeyAlternateName', + link: 'https://mongodb.com/docs/manual/reference/method/KeyVault.addKeyAlternateName/#KeyVault.addKeyAlternateName', }, }, }, }, ClientEncryption: { help: { - link: 'https://docs.mongodb.com/manual/core/security-client-side-encryption/', + link: 'https://mongodb.com/docs/manual/core/security-client-side-encryption/', description: 'The ClientEncryption object for the current database collection.', attributes: { encrypt: { - link: 'https://docs.mongodb.com/manual/reference/method/ClientEncryption.encrypt/#ClientEncryption.encrypt', + link: 'https://mongodb.com/docs/manual/reference/method/ClientEncryption.encrypt/#ClientEncryption.encrypt', description: 'Encrypts the value using the specified encryptionKeyId and encryptionAlgorithm. encrypt supports explicit (manual) encryption of field values.', }, encryptExpression: { - link: 'https://docs.mongodb.com/manual/reference/method/ClientEncryption.encrypt/#ClientEncryption.encryptExpression', + link: 'https://mongodb.com/docs/manual/reference/method/ClientEncryption.encrypt/#ClientEncryption.encryptExpression', description: 'Encrypts an MQL expression using the specified encryptionKeyId and encryptionAlgorithm.', }, decrypt: { - link: 'https://docs.mongodb.com/manual/reference/method/ClientEncryption.decrypt/#ClientEncryption.decrypt', + link: 'https://mongodb.com/docs/manual/reference/method/ClientEncryption.decrypt/#ClientEncryption.decrypt', description: 'decrypts the encryptionValue if the current database connection was configured with access to the Key Management Service (KMS) and key vault used to encrypt encryptionValue.', }, createEncryptedCollection: { - link: 'https://docs.mongodb.com/manual/reference/method/ClientEncryption.createEncryptedCollection/#ClientEncryption.createEncryptedCollection', + link: 'https://mongodb.com/docs/manual/reference/method/ClientEncryption.createEncryptedCollection/#ClientEncryption.createEncryptedCollection', description: 'Creates a new collection with a list of encrypted fields each with unique and auto-created data encryption keys (DEKs). This method should be invoked on a connection instantiated with queryable encryption options.', example: diff --git a/packages/mongosh/README.md b/packages/mongosh/README.md index b6b7a6fca9..2a8f824966 100644 --- a/packages/mongosh/README.md +++ b/packages/mongosh/README.md @@ -97,7 +97,7 @@ of mongosh, visit https://www.mongodb.com/try/download/shell. Start mongosh using 'ships' database on specified connection string: $ mongosh mongodb://192.168.0.5:9999/ships - For more information on usage: https://docs.mongodb.com/mongodb-shell. + For more information on usage: https://mongodb.com/docs/mongodb-shell. ``` diff --git a/packages/node-runtime-worker-thread/src/worker-runtime.spec.ts b/packages/node-runtime-worker-thread/src/worker-runtime.spec.ts index 11eb59b4d4..261a4fcff1 100644 --- a/packages/node-runtime-worker-thread/src/worker-runtime.spec.ts +++ b/packages/node-runtime-worker-thread/src/worker-runtime.spec.ts @@ -207,7 +207,7 @@ describe('worker-runtime', function () { expect(printable).to.have.property('help', 'Shell Help'); expect(printable) .to.have.property('docs') - .match(/https:\/\/docs.mongodb.com/); + .match(/https:\/\/mongodb.com\/docs/); }, ], ]; diff --git a/packages/shell-api/src/collection.ts b/packages/shell-api/src/collection.ts index 7b7432d77b..829d9abe6e 100644 --- a/packages/shell-api/src/collection.ts +++ b/packages/shell-api/src/collection.ts @@ -2016,7 +2016,7 @@ export default class Collection extends ShellApiWithMongoClass { optionsOrOutString: MapReduceShellOptions ): Promise { await this._instanceState.printDeprecationWarning( - 'Collection.mapReduce() is deprecated. Use an aggregation instead.\nSee https://docs.mongodb.com/manual/core/map-reduce for details.' + 'Collection.mapReduce() is deprecated. Use an aggregation instead.\nSee https://mongodb.com/docs/manual/core/map-reduce for details.' ); assertArgsDefinedType( [map, reduce, optionsOrOutString], diff --git a/packages/shell-api/src/field-level-encryption.ts b/packages/shell-api/src/field-level-encryption.ts index 486ca41c05..92b168b01c 100644 --- a/packages/shell-api/src/field-level-encryption.ts +++ b/packages/shell-api/src/field-level-encryption.ts @@ -326,7 +326,7 @@ export class KeyVault extends ShellApiWithMongoClass { if (typeof masterKeyOrAltNamesOrDataKeyOptions === 'string') { if (kms === 'local' && masterKeyOrAltNamesOrDataKeyOptions === '') { // allowed in the old shell - even enforced prior to 4.2.3 - // https://docs.mongodb.com/manual/reference/method/KeyVault.createKey/ + // https://mongodb.com/docs/manual/reference/method/KeyVault.createKey/ masterKey = undefined; } else { throw new MongoshInvalidInputError( diff --git a/packages/shell-api/src/helpers.ts b/packages/shell-api/src/helpers.ts index 69ec523e08..a961b66937 100644 --- a/packages/shell-api/src/helpers.ts +++ b/packages/shell-api/src/helpers.ts @@ -1100,7 +1100,7 @@ export function markAsExplainOutput(value: T): T { return value; } -// https://docs.mongodb.com/v5.0/reference/limits/#naming-restrictions +// https://mongodb.com/docs/v5.0/reference/limits/#naming-restrictions // For db names, $ can be valid in some contexts (e.g. $external), // so we let the server reject it if necessary. export function isValidDatabaseName(name: string): boolean { diff --git a/packaging/LICENSE-crypt-library b/packaging/LICENSE-crypt-library index 5dba125ea2..fe2c165eea 100644 --- a/packaging/LICENSE-crypt-library +++ b/packaging/LICENSE-crypt-library @@ -13,7 +13,7 @@ By agreeing to an Order Form that references this Customer Agreement (this “Ag “Deliverable” means a work provided to you as a part of the Consulting Services, including any report. -“Documentation” means the instructions, specifications and information regarding the Software available at https://docs.mongodb.com/. +“Documentation” means the instructions, specifications and information regarding the Software available at https://mongodb.com/docs/. “Order Form” means an ordering document for Subscriptions signed by both parties that refers to this Agreement.