Thanks Alin! This was what I was looking for. Seems like the Java Client doesn't support this yet (at least from what I could find) Just in case, here is a simple class that should be used instead of the expected BinRangeQuery: public class KeyRangeQuery extends AbstractRangeQuery<String> { protected KeyRangeQuery(String bucket, String from, String to) { super("$key", bucket, from, to); }
@Override public void write(IndexWriter writer) throws IOException { writer.write(getBucket(), getIndex(), from(), to()); } } Regards Gal On Sat, Jan 14, 2012 at 1:08 PM, Alin Popa <alin.p...@gmail.com> wrote: > Hi Gal, > > Here is one of the examples that I've found useful in the past for exactly > this purpose: > http://comments.gmane.org/gmane.comp.db.riak.user/5995 > > HTH, > Alin > > On Sat, Jan 14, 2012 at 12:52 PM, Gal Barnea <g...@eyeviewdigital.com> wrote: >> >> Hi all >> I've been doing some work with Secondary Indexes and noticed this on >> the web site: >> "The $key index field is a special field that is implicitly indexed on >> all objects when Secondary Indexes is enabled. The value of this field >> is the object's key, so this field allows an application to perform >> range queries across the keys in a bucket" >> (http://wiki.basho.com/Secondary-Indexes.html) >> >> However, I can't seem to find an example using it for queries anywhere >> (Curl, RiakJS, Java client) or a way of seeing that it was indeed >> created/used... >> >> Any help would be appreciated >> >> Cheers >> Gal >> >> _______________________________________________ >> riak-users mailing list >> riak-users@lists.basho.com >> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > > _______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com