Skip to content

Commit 361ea8e

Browse files
(DOCSP-32355): Add steps to remove document from the Atlas UI (#4766) (#4801)
* Add Atlas UI steps to page * Revise for updated procedure guidelines * Apply Sarah's suggestion * Move limitation note higher up --------- Co-authored-by: Sarah Simpers <[email protected]>
1 parent 60f4ffd commit 361ea8e

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

source/tutorial/remove-documents.txt

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ Delete Documents
1818
:backlinks: none
1919
:depth: 1
2020

21+
You can delete documents in MongoDB using the following methods:
22+
23+
- Your programming language's driver
24+
- The :atlas:`{+atlas+} UI </>`. To learn more, see
25+
:ref:`delete-documents-atlas-ui`.
26+
- :compass:`MongoDB Compass </>`
27+
2128
----------
2229

2330
.. |arrow| unicode:: U+27A4
@@ -659,6 +666,66 @@ Delete Only One Document that Matches a Condition
659666

660667
.. include:: /includes/driver-examples/driver-example-delete-58.rst
661668

669+
.. _delete-documents-atlas-ui:
670+
671+
Delete a Document with {+atlas+}
672+
------------------------------------
673+
674+
.. note::
675+
676+
You can delete only one document at a time in the {+atlas+} UI.
677+
To delete multiple documents, connect to your
678+
Atlas deployment from :binary:`~bin.mongo` or a MongoDB driver
679+
and follow the examples on this page for your preferred method.
680+
681+
The example in this section uses the :atlas:`sample movies dataset
682+
</sample-data/sample-mflix/>`. To learn how to load the sample dataset
683+
into your {+atlas+} deployment, see :atlas:`Load Sample Data
684+
</sample-data/#std-label-load-sample-data>`.
685+
686+
To delete a document in {+atlas+}, follow these steps:
687+
688+
.. procedure::
689+
:style: normal
690+
691+
.. step:: Navigate to the collection.
692+
693+
a. In the {+atlas+} UI, click :guilabel:`Database` in the sidebar.
694+
#. For the database deployment that contains the sample data, click :guilabel:`Browse Collections`.
695+
#. In the left navigation pane, select the :guilabel:`sample_mflix` database.
696+
#. Select the :guilabel:`movies` collection.
697+
698+
.. step:: Specify a query filter document.
699+
700+
Optionally, you can specify a :ref:`query filter document <document-query-filter>`
701+
in the :guilabel:`Filter` field. A query filter document uses
702+
:ref:`query operators <csfle-supported-query-operators>` to specify search conditions.
703+
704+
Copy the following query filter document into the
705+
:guilabel:`Filter` search bar and click :guilabel:`Apply`:
706+
707+
.. code-block:: javascript
708+
709+
{ genres: "Action", rated: { $in: [ "PG", "PG-13" ] } }
710+
711+
This query filter returns all documents in the ``sample_mflix.movies``
712+
collection where ``genres`` equals ``Action`` and ``rated`` equals either
713+
``PG`` or ``PG-13``.
714+
715+
.. step:: Delete a document.
716+
717+
a. For the document that you want to delete, hover over
718+
the document and click the trash icon that
719+
appears on the right-hand side.
720+
721+
After clicking the delete button, {+atlas+} flags
722+
the document for deletion and asks for your confirmation.
723+
724+
#. Click :guilabel:`Delete` to confirm your selection.
725+
726+
To learn more, see :atlas:`Create, View, Update, and Delete Documents
727+
</atlas-ui/documents/>`.
728+
662729
.. _write-op-delete-behavior:
663730
.. _write-op-remove-behavior:
664731

0 commit comments

Comments
 (0)