Needed this today, so I implemented it.
Added support for 2i queries that use $bucket.
Derp, fixed a compile issue.
Note, this will allow the java client to support functionality already in the HTTP API: curl host:port/buckets/mybucket/index/$bucket/_
Added a test case for this and merged it into PR#129. Closing this PR