{"action":"created","issue":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/955","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/955/labels{/name}","comments_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/955/comments","events_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/955/events","html_url":"https://github.com/rethinkdb/rethinkdb/issues/955","id":15234013,"number":955,"title":"ReQL non proposal: Getting keys whose compound indexes has a common prefix.","user":{"login":"jdoliner","id":43867,"avatar_url":"https://avatars.githubusercontent.com/u/43867?v=3","gravatar_id":"","url":"https://api.github.com/users/jdoliner","html_url":"https://github.com/jdoliner","followers_url":"https://api.github.com/users/jdoliner/followers","following_url":"https://api.github.com/users/jdoliner/following{/other_user}","gists_url":"https://api.github.com/users/jdoliner/gists{/gist_id}","starred_url":"https://api.github.com/users/jdoliner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdoliner/subscriptions","organizations_url":"https://api.github.com/users/jdoliner/orgs","repos_url":"https://api.github.com/users/jdoliner/repos","events_url":"https://api.github.com/users/jdoliner/events{/privacy}","received_events_url":"https://api.github.com/users/jdoliner/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/labels/tp:RQL_proposal","name":"tp:RQL_proposal","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/milestones/2","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb/milestones/2/labels","id":211054,"number":2,"title":"backlog","description":"Issues in this milestone are not an immediate priority, and will be periodically revisited. When we decide to work on an issue in backlog, we'll move it to next.","creator":{"login":"coffeemug","id":48436,"avatar_url":"https://avatars.githubusercontent.com/u/48436?v=3","gravatar_id":"","url":"https://api.github.com/users/coffeemug","html_url":"https://github.com/coffeemug","followers_url":"https://api.github.com/users/coffeemug/followers","following_url":"https://api.github.com/users/coffeemug/following{/other_user}","gists_url":"https://api.github.com/users/coffeemug/gists{/gist_id}","starred_url":"https://api.github.com/users/coffeemug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coffeemug/subscriptions","organizations_url":"https://api.github.com/users/coffeemug/orgs","repos_url":"https://api.github.com/users/coffeemug/repos","events_url":"https://api.github.com/users/coffeemug/events{/privacy}","received_events_url":"https://api.github.com/users/coffeemug/received_events","type":"User","site_admin":false},"open_issues":367,"closed_issues":2,"state":"open","created_at":"2012-11-11T14:16:11Z","updated_at":"2015-02-19T02:40:07Z","due_on":null,"closed_at":null},"comments":31,"created_at":"2013-06-06T17:11:47Z","updated_at":"2015-02-20T04:58:38Z","closed_at":null,"body":"Suppose I have a compound index `cid` and I want to get all of documents that have `\"foo\"` as the first value in the compound index. AFAIK there isn't a great way to do this in ReQL. The best way to do this that I can come up with is:\r\n\r\n```Python\r\nr.table.between([\"foo\"], [\"fop\"], id = \"cid\").filter(lambda x: x[\"cid\"][0] == \"foo\")\r\n```\r\nWhich isn't terribly pretty. I'm not sure I have a full proposal for this (hence the non proposal title). I'd like the support the syntax:\r\n\r\n```Python\r\nr.table.prefix([\"foo\"], id = \"cid\")\r\n```\r\n\r\nwhich would be feasible. What do others think would be a good API for this?"},"comment":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/comments/75189881","html_url":"https://github.com/rethinkdb/rethinkdb/issues/955#issuecomment-75189881","issue_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/955","id":75189881,"user":{"login":"stuartpb","id":572196,"avatar_url":"https://avatars.githubusercontent.com/u/572196?v=3","gravatar_id":"","url":"https://api.github.com/users/stuartpb","html_url":"https://github.com/stuartpb","followers_url":"https://api.github.com/users/stuartpb/followers","following_url":"https://api.github.com/users/stuartpb/following{/other_user}","gists_url":"https://api.github.com/users/stuartpb/gists{/gist_id}","starred_url":"https://api.github.com/users/stuartpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuartpb/subscriptions","organizations_url":"https://api.github.com/users/stuartpb/orgs","repos_url":"https://api.github.com/users/stuartpb/repos","events_url":"https://api.github.com/users/stuartpb/events{/privacy}","received_events_url":"https://api.github.com/users/stuartpb/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T04:58:38Z","updated_at":"2015-02-20T04:58:38Z","body":"So `r.table(...).between([\"foo\", r.minval], [\"foo\", r.maxval])` could just be reduced to `r.table(...).between([\"foo\"], [\"foo\", r.maxval])` ?"}}