Title: Cannot combine 'order' and 'filters' in same query · Issue #860 · googleapis/google-cloud-python · GitHub
Open Graph Title: Cannot combine 'order' and 'filters' in same query · Issue #860 · googleapis/google-cloud-python
X Title: Cannot combine 'order' and 'filters' in same query · Issue #860 · googleapis/google-cloud-python
Description: I am trying to query comments that belong to a story. query = datastore.Query(kind='Comment', filters=[('storyid', '=', 12345)], order=['timestamp']) This code breaks with to following error (I also have additional internal debug info I ...
Open Graph Description: I am trying to query comments that belong to a story. query = datastore.Query(kind='Comment', filters=[('storyid', '=', 12345)], order=['timestamp']) This code breaks with to following error (I als...
X Description: I am trying to query comments that belong to a story. query = datastore.Query(kind='Comment', filters=[('storyid', '=', 12345)], order=['timestamp']) This code break...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/860
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cannot combine 'order' and 'filters' in same query ","articleBody":"I am trying to query comments that belong to a story.\n\n``` python\nquery = datastore.Query(kind='Comment', filters=[('storyid', '=', 12345)], order=['timestamp'])\n```\n\nThis code breaks with to following error (I also have additional internal debug info I can share):\n\n``` python\ngcloud.exceptions.PreconditionFailed: 412 no matching index found.\n```\n\nTrying to debug this, I found the following work with no problems:\n\nRemoving order\n\n``` python\nquery = datastore.Query(kind='Comment', filters=[('storyid', '=', 12345)])\n```\n\nRemoving filters\n\n``` python\nquery = datastore.Query(kind='Comment', order=['timestamp'])\n```\n\nChanging order to use storyid\n\n``` python\nquery = datastore.Query(kind='Comment', filters=[('storyid', '=', 12345)], order=['storyid'])\n```\n\nWhy is this happening? The fact that the bottom three queries work and to top one does not is very confusing. Nothing I saw in the documentation indicates that filters and order affect each other.\n","author":{"url":"https://github.com/thesandlord","@type":"Person","name":"thesandlord"},"datePublished":"2015-05-04T22:18:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/860/google-cloud-python/issues/860"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4e70e5a1-d071-a5e0-aef7-a38827733d1f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B2A2:35C55B:AD4E83:ED13BF:6A4DC1D8 |
| html-safe-nonce | 1dafa49eb7085a9a2b553f256556e7ba3aebeb03934e9f30f52ac3572a5179e2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMkEyOjM1QzU1QjpBRDRFODM6RUQxM0JGOjZBNERDMUQ4IiwidmlzaXRvcl9pZCI6IjY1ODY2NjAwNTYyMDQxNjU1OTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b2e2e80652668d0049670a1d8d2b465d5aa7c83f6b95a52d6036f00845ba95ee |
| hovercard-subject-tag | issue:73143464 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/860/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c5031943dcabed2ed437c696eee3892b51e38b812e51c03384d3740e4cfb4dd6/googleapis/google-cloud-python/issues/860 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c5031943dcabed2ed437c696eee3892b51e38b812e51c03384d3740e4cfb4dd6/googleapis/google-cloud-python/issues/860 |
| og:image:alt | I am trying to query comments that belong to a story. query = datastore.Query(kind='Comment', filters=[('storyid', '=', 12345)], order=['timestamp']) This code breaks with to following error (I als... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | thesandlord |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width