{"action":"created","issue":{"url":"https://api.github.com/repos/apache/couchdb-fauxton/issues/1155","repository_url":"https://api.github.com/repos/apache/couchdb-fauxton","labels_url":"https://api.github.com/repos/apache/couchdb-fauxton/issues/1155/labels{/name}","comments_url":"https://api.github.com/repos/apache/couchdb-fauxton/issues/1155/comments","events_url":"https://api.github.com/repos/apache/couchdb-fauxton/issues/1155/events","html_url":"https://github.com/apache/couchdb-fauxton/pull/1155","id":379268684,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5Nzc3MjYy","number":1155,"title":"[partitioned dbs] Support partitioned mango queries and creating partitioned indexes","user":{"login":"Antonio-Maranhao","id":30349380,"node_id":"MDQ6VXNlcjMwMzQ5Mzgw","avatar_url":"https://avatars0.githubusercontent.com/u/30349380?v=4","gravatar_id":"","url":"https://api.github.com/users/Antonio-Maranhao","html_url":"https://github.com/Antonio-Maranhao","followers_url":"https://api.github.com/users/Antonio-Maranhao/followers","following_url":"https://api.github.com/users/Antonio-Maranhao/following{/other_user}","gists_url":"https://api.github.com/users/Antonio-Maranhao/gists{/gist_id}","starred_url":"https://api.github.com/users/Antonio-Maranhao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Antonio-Maranhao/subscriptions","organizations_url":"https://api.github.com/users/Antonio-Maranhao/orgs","repos_url":"https://api.github.com/users/Antonio-Maranhao/repos","events_url":"https://api.github.com/users/Antonio-Maranhao/events{/privacy}","received_events_url":"https://api.github.com/users/Antonio-Maranhao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-09T18:16:48Z","updated_at":"2018-11-13T12:16:55Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/1155","html_url":"https://github.com/apache/couchdb-fauxton/pull/1155","diff_url":"https://github.com/apache/couchdb-fauxton/pull/1155.diff","patch_url":"https://github.com/apache/couchdb-fauxton/pull/1155.patch"},"body":"## Overview\r\n\r\nSixth in a series of PRs that will be submitted in support of the new user-defined partitioned databases feature (apache/couchdb#1605).\r\n\r\nSummary:\r\n\r\n - Show results for partitioned mango queries\r\n - Create partitioned indexes\r\n\r\n## Testing recommendations\r\n\r\nOn a partitioned database: \r\n- Go to **Run A Query with Mango**\r\n  - Verify the Partition Selector is displayed at the top\r\n- Click on **Run Query**\r\n  - Verify all docs that match are returned\r\n- Set a partition key\r\n  - Verify the results are updated with only those that match the key\r\n- Click on **Explain**\r\n  - Verify the results include the selected partition under `\"opts\"`\r\n\r\n- Click on **manage indexes**\r\n  - Verify the **partitioned** checkbox is displayed and it is checked\r\n- Click on **Create Index**\r\n  - Verify the results include the new index, and the index code includes `\"design_opts\": { \"partitioned\": true }`\r\n- Uncheck the **partitioned** checkbox and click on **Create Index**\r\n  - Verify the results include the new index, and the index code includes `\"design_opts\": { \"partitioned\": false }`\r\n- Add `partitioned: true` to the index code in the editor, make sure the checkbox is unchecked, then click on **Create Index** \r\n  - Verify the results include the new index, and the index code includes `\"design_opts\": { \"partitioned\": true }` - which means the value in the editor takes precedence over the checkbox.\r\n\r\n## Related Pull Requests\r\n\r\napache/couchdb#1605\r\n\r\n## Checklist\r\n\r\n- [x] Code is written and works correctly;\r\n- [x] Changes are covered by tests;\r\n"},"comment":{"url":"https://api.github.com/repos/apache/couchdb-fauxton/issues/comments/438245948","html_url":"https://github.com/apache/couchdb-fauxton/pull/1155#issuecomment-438245948","issue_url":"https://api.github.com/repos/apache/couchdb-fauxton/issues/1155","id":438245948,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODI0NTk0OA==","user":{"login":"garrensmith","id":179458,"node_id":"MDQ6VXNlcjE3OTQ1OA==","avatar_url":"https://avatars2.githubusercontent.com/u/179458?v=4","gravatar_id":"","url":"https://api.github.com/users/garrensmith","html_url":"https://github.com/garrensmith","followers_url":"https://api.github.com/users/garrensmith/followers","following_url":"https://api.github.com/users/garrensmith/following{/other_user}","gists_url":"https://api.github.com/users/garrensmith/gists{/gist_id}","starred_url":"https://api.github.com/users/garrensmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garrensmith/subscriptions","organizations_url":"https://api.github.com/users/garrensmith/orgs","repos_url":"https://api.github.com/users/garrensmith/repos","events_url":"https://api.github.com/users/garrensmith/events{/privacy}","received_events_url":"https://api.github.com/users/garrensmith/received_events","type":"User","site_admin":false},"created_at":"2018-11-13T12:16:55Z","updated_at":"2018-11-13T12:16:55Z","author_association":"MEMBER","body":"When we send a mango query we end up setting the r value (Number of reads from a replica) before returning the result. And if I look at the _explain for some reason its set to 49\r\n```\r\n\"r\": [\r\n   49\r\n  ],\r\n```\r\n\r\nOnce we add in the partition restrictions this is going to cause an issue. r must always be equal to 1 fro partitions."}}
{"actor":{"display_login":"garrensmith"}}