File tree Expand file tree Collapse file tree 5 files changed +14
-14
lines changed Expand file tree Collapse file tree 5 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,9 @@ Tutorial
9090 Next, add a :manual:`$sort
9191 </reference/operator/aggregation/sort>` stage that sorts the
9292 documents in descending order by the ``dateofbirth`` field to
93- list the youngest people first:
93+ list the youngest people first. Because Python dictionaries don't maintain the
94+ order of their elements, use a ``SON``or ``OrderedDict`` object
95+ instead:
9496
9597 .. literalinclude:: /includes/aggregation/filtered-subset.py
9698 :language: python
Original file line number Diff line number Diff line change 1- As python dictionaries don't maintain order you should use ``~bson.son.SON``
2- or ``collections.OrderedDict`` where explicit ordering is required
3- eg "$sort":
4-
51To run an explain plan for this aggregation use
62`PyMongoExplain <https://pypi.org/project/pymongoexplain/>`_,
73a companion library for PyMongo. It allows you to explain any CRUD operation
Original file line number Diff line number Diff line change @@ -12,9 +12,13 @@ Connect to MongoDB
1212 :maxdepth: 1
1313
1414 /connect/tls
15- /connect/client-certificates
15+ /connect/network-compression
16+ /connect/server-selection
17+ /connect/stable-api
1618 /connect/csot
1719
1820- :ref:`pymongo-tls`
19- - :ref:`pymongo-client-certificates`
21+ - :ref:`pymongo-network-compression`
22+ - :ref:`pymongo-server-selection`
23+ - :ref:`pymongo-stable-api`
2024- :ref:`pymongo-csot`
Original file line number Diff line number Diff line change @@ -11,14 +11,12 @@ Fundamentals
1111 :titlesonly:
1212 :maxdepth: 1
1313
14- /fundamentals/authentication
1514 /fundamentals/collations
1615 /fundamentals/databases-and-collections
1716 /fundamentals/dates-and-times
1817 /fundamentals/gridfs
1918 /fundamentals/type-hints
2019
21- - :ref:`pymongo-auth`
2220- :ref:`pymongo-collations`
2321- :ref:`pymongo-databases-collections`
2422- :ref:`pymongo-dates-times`
Original file line number Diff line number Diff line change @@ -10,11 +10,6 @@ Troubleshooting
1010.. meta::
1111 :keywords: error, help
1212
13- .. note:: Troubleshooting TLS Errors
14-
15- For information about TLS errors you might see when using {+driver-short+}, see the
16- :ref:`TLSErrors` section.
17-
1813Server Reports Wire Version X, PyMongo Requires Y
1914-------------------------------------------------
2015
432427
433428.. include:: /includes/troubleshooting/tls.rst
434429
430+ Client-Side Operation Timeouts
431+ ------------------------------
432+
433+ .. include:: /includes/troubleshooting/csot.rst
434+
435435Projections
436436-----------
437437
You can’t perform that action at this time.
0 commit comments