Skip to content

Commit 48b536b

Browse files
committed
cound docs
1 parent 111ff10 commit 48b536b

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

source/usage-examples/count.txt renamed to source/crud/read-operations/count.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
.. _java-usage-count:
2+
.. _java-count:
23

34
===============
45
Count Documents
56
===============
67

8+
.. contents:: On this page
9+
:local:
10+
:backlinks: none
11+
:depth: 1
12+
:class: singlecol
713

8-
9-
There are two instance methods in the ``MongoCollection`` class that you can
10-
call to count the number of documents in a collection:
14+
In this guide, you can learn how to count documents in your MongoDB
15+
database collection. There are two instance methods in the ``MongoCollection``
16+
class that you can call to count the number of documents in a collection:
1117

1218
- ``countDocuments()`` returns the number of documents in the collection
1319
that match a specified query. If you specify an empty query filter,
@@ -84,7 +90,7 @@ collection with ``Canada`` in the ``countries`` field.
8490

8591
.. include:: /includes/connect-guide-note.rst
8692

87-
.. literalinclude:: /includes/usage-examples/code-snippets/CountDocuments.java
93+
.. literalinclude:: /includes/crud/CountDocuments.java
8894
:language: java
8995

9096
If you run the preceding sample code, you should see output that looks something

source/logging-monitoring/change-streams.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
.. _java-fundamentals-change-streams:
22
.. _retrieve-watch:
3+
.. _java-usage-watch:
34

45
===================
56
Open Change Streams
67
===================
78

9+
.. meta::
10+
:keywords: watch, changestream, log, monitor, events
11+
:description: Learn about how to use change streams in the {+driver-long+}.
12+
813
.. contents:: On this page
914
:local:
1015
:backlinks: none
11-
:depth: 2
16+
:depth: 3
1217
:class: singlecol
1318

1419
Overview
@@ -147,7 +152,8 @@ To use the following examples, run the files in this order:
147152

148153
.. note::
149154

150-
The ``Watch.java`` file will continue running until the ``WatchCompanion.java`` file
155+
The ``Watch.java`` file will continue running until the
156+
``WatchCompanion.java`` file is run.
151157

152158
``Watch.java``:
153159

0 commit comments

Comments
 (0)