Skip to content

Commit

Permalink
DOCSP-35279-shell-crosslinks-batch-3 (#9481)
Browse files Browse the repository at this point in the history
* DOCSP-35279-shell-crosslinks-batch-3

* fixed wayfinding mistake

* changed wayfinding spacing

* lots of fixes especially to find and modify

* saving dropindexes bc you cant be too careful

* estimated document count method

* more edits

* linking to updated versions

* more feedback

* last fixes

* last fix for real

* weird links
  • Loading branch information
gmiller-mdb authored Oct 2, 2024
1 parent 6bc6e2b commit 9b3bbc3
Show file tree
Hide file tree
Showing 10 changed files with 244 additions and 5 deletions.
47 changes: 47 additions & 0 deletions source/includes/wayfinding/mongosh-method-dropIndexes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.. wayfinding:: MongoDB with drivers

.. wayfinding-description::

.. include:: /includes/wayfinding-description.rst

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/java/sync/v5.2/fundamentals/indexes/#remove-an-index-using-a-wildcard-character
:id: java-sync

.. wayfinding-option:: https://mongodb.github.io/mongo-java-driver/5.2/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#dropIndexes()
:id: java-rs

.. wayfinding-option:: https://mongodb.github.io/mongo-csharp-driver/2.29.0/api/MongoDB.Driver/MongoDB.Driver.IMongoIndexManager-1.DropAll.html
:id: csharp

.. wayfinding-option:: https://mongoc.org/libmongoc/current/mongoc_collection_drop_index.html
:id: c

.. wayfinding-option:: https://www.mongodb.com/docs/languages/cpp/cpp-driver/upcoming/work-with-indexes/#remove-all-indexes
:id: cpp

.. wayfinding-option:: https://pymongo.readthedocs.io/en/stable/api/pymongo/collection.html#pymongo.collection.Collection.drop_indexes
:id: pymongo

.. wayfinding-option:: https://mongodb.github.io/node-mongodb-native/6.9/classes/Collection.html#dropIndexes
:id: nodejs

.. wayfinding-option:: https://pkg.go.dev/go.mongodb.org/[email protected]/mongo#IndexView.DropAll
:id: go

.. wayfinding-option:: https://www.mongodb.com/docs/php-library/current/indexes/index-mgmt/#delete-all-indexes
:id: php

.. wayfinding-option:: https://mongodb.github.io/mongo-java-driver/5.2/apidocs/mongo-scala-driver/org/mongodb/scala/MongoCollection.html#dropIndexes():org.mongodb.scala.SingleObservable[Unit]
:id: scala

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/kotlin/coroutine/current/fundamentals/indexes/#remove-an-index-using-a-wildcard-character
:id: kotlin-coroutine

.. wayfinding-option:: https://www.mongodb.com/docs/languages/kotlin/kotlin-sync-driver/current/work-with-indexes/#delete-all-indexes
:id: kotlin-sync

.. wayfinding-option:: https://www.mongodb.com/docs/mongoid/current/reference/indexes/#index-management-rake-tasks
:id: mongoid

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/rust/current/fundamentals/indexes/#remove-an-index
:id: rust
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.. wayfinding:: MongoDB with drivers

.. wayfinding-description::

.. include:: /includes/wayfinding-description.rst

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/java/sync/current/usage-examples/count/
:id: java-sync

.. wayfinding-option:: https://mongodb.github.io/mongo-java-driver/5.2/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#estimatedDocumentCount()
:id: java-rs

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/csharp/current/fundamentals/crud/read-operations/count/#estimated-count
:id: csharp

.. wayfinding-option:: https://mongoc.org/libmongoc/current/mongoc_collection_estimated_document_count.html
:id: c

.. wayfinding-option:: https://www.mongodb.com/docs/languages/cpp/cpp-driver/upcoming/read/count/#retrieve-an-estimated-count
:id: cpp

.. wayfinding-option:: https://www.mongodb.com/docs/languages/python/pymongo-driver/current/read/count/#retrieve-an-estimated-count
:id: pymongo

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/node/current/usage-examples/count/
:id: nodejs

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/go/current/fundamentals/crud/read-operations/count/#estimated-count
:id: go

.. wayfinding-option:: https://www.mongodb.com/docs/php-library/current/read/count/#retrieve-an-estimated-count
:id: php

.. wayfinding-option:: https://mongodb.github.io/mongo-java-driver/5.2/apidocs/mongo-scala-driver/org/mongodb/scala/MongoCollection.html#estimatedDocumentCount():org.mongodb.scala.SingleObservable[Long]
:id: scala

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/kotlin/coroutine/current/usage-examples/count/
:id: kotlin-coroutine

.. wayfinding-option:: https://www.mongodb.com/docs/languages/kotlin/kotlin-sync-driver/current/read/count/#retrieve-an-estimated-count
:id: kotlin-sync

.. wayfinding-option:: https://www.mongodb.com/docs/mongoid/current/reference/queries/#additional-query-methods
:id: mongoid

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/rust/current/usage-examples/count/
:id: rust
47 changes: 47 additions & 0 deletions source/includes/wayfinding/mongosh-method-explain.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.. wayfinding:: MongoDB with drivers

.. wayfinding-description::

.. include:: /includes/wayfinding-description.rst

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/java/sync/current/fundamentals/aggregation/#explain-aggregation-example
:id: java-sync

.. wayfinding-option:: https://www.mongodb.com/docs/languages/java/reactive-streams-driver/current/tutorials/aggregation/#explain-an-aggregation
:id: java-rs

.. wayfinding-option:: https://mongodb.github.io/mongo-csharp-driver/2.29.0/api/MongoDB.Driver/MongoDB.Driver.Core.Operations.ExplainOperation.-ctor.html
:id: csharp

.. wayfinding-option:: https://mongoc.org/libmongoc/current/mongoc_collection_find.html#the-explain-command
:id: c

.. wayfinding-option:: https://www.mongodb.com/docs/languages/cpp/cpp-driver/upcoming/aggregation/#explain-an-aggregation
:id: cpp

.. wayfinding-option:: https://www.mongodb.com/docs/languages/python/pymongo-driver/current/aggregation/#explain-an-aggregation
:id: pymongo

.. wayfinding-option:: https://mongodb.github.io/node-mongodb-native/6.9/classes/FindCursor.html#explain
:id: nodejs

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/go/current/fundamentals/run-command/#example
:id: go

.. wayfinding-option:: https://www.mongodb.com/docs/php-library/current/reference/method/MongoDBCollection-explain/
:id: php

.. wayfinding-option:: https://www.mongodb.com/docs/languages/scala/scala-driver/current/tutorials/aggregation/#explain-an-aggregation
:id: scala

.. wayfinding-option:: https://mongodb.github.io/mongo-java-driver/5.2/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-aggregate-flow/explain.html?query=suspend%20fun%20%3CR%20:%20Any%3E%20explain(resultClass:%20Class%3CR%3E,%20verbosity:%20ExplainVerbosity?%20=%20null):%20R
:id: kotlin-coroutine

.. wayfinding-option:: https://mongodb.github.io/mongo-java-driver/5.2/apidocs/mongodb-driver-kotlin-sync/mongodb-driver-kotlin-sync/com.mongodb.kotlin.client/-aggregate-iterable/explain.html?query=fun%20%3CR%20:%20Any%3E%20explain(resultClass:%20Class%3CR%3E,%20verbosity:%20ExplainVerbosity?%20=%20null):%20R
:id: kotlin-sync

.. wayfinding-option:: https://www.rubydoc.info/github/mongoid/mongoid/Mongoid%2FContextual%2FMongo:explain
:id: mongoid

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/rust/current/fundamentals/run-command/#command-example
:id: rust
47 changes: 47 additions & 0 deletions source/includes/wayfinding/mongosh-method-find.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.. wayfinding:: MongoDB with drivers

.. wayfinding-description::

.. include:: /includes/wayfinding-description.rst

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/java/sync/current/fundamentals/crud/read-operations/retrieve/
:id: java-sync

.. wayfinding-option:: https://www.mongodb.com/docs/languages/java/reactive-streams-driver/current/read/retrieve-data/
:id: java-rs

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/csharp/current/fundamentals/crud/read-operations/retrieve/
:id: csharp

.. wayfinding-option:: https://mongoc.org/libmongoc/current/mongoc_collection_find_with_opts.html
:id: c

.. wayfinding-option:: https://www.mongodb.com/docs/languages/cpp/cpp-driver/upcoming/read/retrieve/
:id: cpp

.. wayfinding-option:: https://www.mongodb.com/docs/languages/python/pymongo-driver/current/read/retrieve/
:id: pymongo

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/node/current/fundamentals/crud/read-operations/retrieve/
:id: nodejs

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/go/current/fundamentals/crud/read-operations/retrieve/
:id: go

.. wayfinding-option:: https://www.mongodb.com/docs/php-library/current/reference/method/MongoDBCollection-find/
:id: php

.. wayfinding-option:: https://www.mongodb.com/docs/languages/scala/scala-driver/current/tutorials/read-ops/
:id: scala

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/kotlin/coroutine/upcoming/fundamentals/crud/read-operations/retrieve/
:id: kotlin-coroutine

.. wayfinding-option:: https://www.mongodb.com/docs/languages/kotlin/kotlin-sync-driver/current/read/retrieve/
:id: kotlin-sync

.. wayfinding-option:: https://www.mongodb.com/docs/mongoid/current/reference/queries/
:id: mongoid

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/rust/current/fundamentals/crud/read-operations/retrieve/
:id: rust
47 changes: 47 additions & 0 deletions source/includes/wayfinding/mongosh-method-findAndModify.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.. wayfinding:: MongoDB with drivers

.. wayfinding-description::

.. include:: /includes/wayfinding-description.rst

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/java/sync/current/fundamentals/crud/compound-operations/#find-and-update
:id: java-sync

.. wayfinding-option:: https://mongodb.github.io/mongo-java-driver/5.2/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#findOneAndUpdate(org.bson.conversions.Bson,org.bson.conversions.Bson)
:id: java-rs

.. wayfinding-option:: https://mongodb.github.io/mongo-csharp-driver/2.29.0/api/MongoDB.Driver/MongoDB.Driver.IMongoCollection-1.FindOneAndUpdate.html
:id: csharp

.. wayfinding-option:: https://mongoc.org/libmongoc/current/mongoc_collection_find_and_modify.html
:id: c

.. wayfinding-option:: https://mongocxx.org/api/current/classmongocxx_1_1v__noabi_1_1collection.html#ad8a81d6d2b34cf3ece9e21d28f0e1d58
:id: cpp

.. wayfinding-option:: https://pymongo.readthedocs.io/en/stable/api/pymongo/collection.html#pymongo.collection.Collection.find_one_and_update
:id: pymongo

.. wayfinding-option:: https://mongodb.github.io/node-mongodb-native/6.9/classes/Collection.html#findOneAndUpdate
:id: nodejs

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/go/current/fundamentals/crud/compound-operations/#find-and-update
:id: go

.. wayfinding-option:: https://www.mongodb.com/docs/php-library/current/reference/method/MongoDBCollection-findOneAndUpdate/
:id: php

.. wayfinding-option:: https://mongodb.github.io/mongo-java-driver/5.2/apidocs/mongo-scala-driver/org/mongodb/scala/MongoCollection.html#findOneAndUpdate(clientSession:org.mongodb.scala.ClientSession,filter:org.mongodb.scala.bson.conversions.Bson,update:Seq[org.mongodb.scala.bson.conversions.Bson],options:org.mongodb.scala.model.FindOneAndUpdateOptions):org.mongodb.scala.SingleObservable[TResult]
:id: scala

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/kotlin/coroutine/current/fundamentals/crud/compound-operations/#find-and-update
:id: kotlin-coroutine

.. wayfinding-option:: https://mongodb.github.io/mongo-java-driver/5.2/apidocs/mongodb-driver-kotlin-sync/mongodb-driver-kotlin-sync/com.mongodb.kotlin.client/-mongo-collection/find-one-and-update.html?query=fun%20findOneAndUpdate(clientSession:%20ClientSession,%20filter:%20Bson,%20update:%20Bson,%20options:%20FindOneAndUpdateOptions%20=%20FindOneAndUpdateOptions()):%20T?
:id: kotlin-sync

.. wayfinding-option:: https://www.rubydoc.info/github/mongoid/mongoid/Mongoid/Contextual/Mongo:find_one_and_update
:id: mongoid

.. wayfinding-option:: https://www.mongodb.com/docs/drivers/rust/current/fundamentals/crud/compound-operations/#find-and-update-a-document
:id: rust
2 changes: 1 addition & 1 deletion source/reference/method/db.collection.dropIndexes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ db.collection.dropIndexes()
:depth: 1
:class: singlecol

.. include:: /includes/wayfinding/mongosh-method-dropIndexes.rst

Definition
----------
Expand All @@ -18,7 +19,6 @@ Definition


.. |dbcommand| replace:: :dbcommand:`dropIndexes` command
.. include:: /includes/fact-mongosh-shell-method-alt.rst


Drops the specified index or indexes (except the index on the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ db.collection.estimatedDocumentCount()
:depth: 1
:class: singlecol

.. include:: /includes/wayfinding/mongosh-method-estimatedDocumentCount.rst

Definition
----------

.. method:: db.collection.estimatedDocumentCount(options)

.. |dbcommand| replace:: :data:`~collStats.count` field returned by the
:dbcommand:`collStats` command
.. include:: /includes/fact-mongosh-shell-method-alt


Returns the count of all documents in a collection or view.
Expand Down
3 changes: 2 additions & 1 deletion source/reference/method/db.collection.explain.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ db.collection.explain()
:depth: 1
:class: singlecol

.. include:: /includes/wayfinding/mongosh-method-explain.rst

Description
-----------

.. method:: db.collection.explain()


.. |dbcommand| replace:: :dbcommand:`explain` command
.. include:: /includes/fact-mongosh-shell-method-alt.rst


Returns information on the query plan for the following methods:
Expand Down
3 changes: 2 additions & 1 deletion source/reference/method/db.collection.find.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ db.collection.find()
:title: Finding Documents Lab
:drawer:

.. include:: /includes/wayfinding/mongosh-method-find.rst

Definition
----------

.. method:: db.collection.find(query, projection, options)

.. |dbcommand| replace:: :dbcommand:`find` command
.. include:: /includes/fact-mongosh-shell-method-alt.rst

Selects documents in a collection or view and returns a
:term:`cursor` to the selected documents.
Expand Down
3 changes: 2 additions & 1 deletion source/reference/method/db.collection.findAndModify.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ db.collection.findAndModify()
(possibly w modifications) to the command findAndModify.txt and vice
versa

.. include:: /includes/wayfinding/mongosh-method-findAndModify.rst

Definition
----------

Expand All @@ -39,7 +41,6 @@ Definition
return the document with the modifications made on the update, use
the ``new`` option.

.. include:: /includes/fact-mongosh-shell-method-alt.rst

Compatibility
-------------
Expand Down

0 comments on commit 9b3bbc3

Please sign in to comment.