diff --git a/README.rst b/README.rst index f15ac4809..115085ac1 100644 --- a/README.rst +++ b/README.rst @@ -25,7 +25,7 @@ For issues with, questions about, or feedback for PyMongo, please look into our `support channels `_. Please do not email any of the PyMongo developers directly with issues or questions - you're more likely to get an answer on the `MongoDB Community -Forums `_. +Forums `_. Bugs / Feature Requests ======================= diff --git a/RELEASE.rst b/RELEASE.rst index ad18446a0..83c6c0f1d 100644 --- a/RELEASE.rst +++ b/RELEASE.rst @@ -84,7 +84,7 @@ Doing a Release 13. Publish the release version in Jira. 14. Announce the release on: - https://developer.mongodb.com/community/forums/c/community/release-notes/ + https://www.mongodb.com/community/forums/c/announcements/driver-releases/110 15. File a ticket for DOCSP highlighting changes in server version and Python version compatibility or the lack thereof, for example: diff --git a/pymongo/read_preferences.py b/pymongo/read_preferences.py index ccb635bec..46f029ed3 100644 --- a/pymongo/read_preferences.py +++ b/pymongo/read_preferences.py @@ -151,6 +151,13 @@ class _ServerMode(object): set, ``{}``, means "read from any member that matches the mode, ignoring tags." MongoClient tries each set of tags in turn until it finds a set of tags with at least one matching member. + For example, to only send a query to an analytic node:: + + Nearest(tag_sets=[{"node":"analytics"}]) + + Or using :class:`SecondaryPreferred`:: + + SecondaryPreferred(tag_sets=[{"node":"analytics"}]) .. seealso:: `Data-Center Awareness `_ @@ -518,7 +525,11 @@ _MODES = ( class ReadPreference(object): - """An enum that defines the read preference modes supported by PyMongo. + """An enum that defines some commonly used read preference modes. + + Apps can also create a custom read preference, for example:: + + Nearest(tag_sets=[{"node":"analytics"}]) See :doc:`/examples/high_availability` for code examples.