{"action":"opened","issue":{"url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose/issues/147","labels_url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose/issues/147/comments","events_url":"https://api.github.com/repos/florianholzapfel/express-restify-mongoose/issues/147/events","html_url":"https://github.com/florianholzapfel/express-restify-mongoose/issues/147","id":103525515,"number":147,"title":"Support for Query.read('ReadPreference.x')","user":{"login":"Zertz","id":2636763,"avatar_url":"https://avatars.githubusercontent.com/u/2636763?v=3","gravatar_id":"","url":"https://api.github.com/users/Zertz","html_url":"https://github.com/Zertz","followers_url":"https://api.github.com/users/Zertz/followers","following_url":"https://api.github.com/users/Zertz/following{/other_user}","gists_url":"https://api.github.com/users/Zertz/gists{/gist_id}","starred_url":"https://api.github.com/users/Zertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zertz/subscriptions","organizations_url":"https://api.github.com/users/Zertz/orgs","repos_url":"https://api.github.com/users/Zertz/repos","events_url":"https://api.github.com/users/Zertz/events{/privacy}","received_events_url":"https://api.github.com/users/Zertz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-27T14:39:31Z","updated_at":"2015-08-27T14:39:31Z","closed_at":null,"body":"When reading form a replica set, there is currently no easy way to read from anything but the primary. The application should trigger some sort of maintenance mode to disable writes, but it would be useful if the library exposed [`.read()`](http://mongoosejs.com/docs/api.html#query_Query-read) to prevent downtime until a secondary picks up.\r\n\r\nI'm thinking something like this:\r\n\r\n```javascript\r\nrestify.defaults({\r\n  readPreference: 'primary'\r\n})\r\n```"}}