Or for something simple like this you can also use my riak_link_index module
https://github.com/krestenkrab/riak_link_index#readme Kresten On Nov 8, 2011, at 2:45 AM, Greg Pascale wrote: > Hi, > > I'm thinking about using 2i for a certain piece of my system, but I'm worried > that the document-based partitioning may make it suboptimal. > > The issue is that the secondary fields I want to query over (email and > username) are unique, so each will only ever map to one value. Since 2i > queries a coverage set, but I'm only ever looking for one result, it's going > to be hitting n-1 machines needlessly. > > So, what I'm looking to understand is how much overhead a single-result 2i > lookup like this will incur vs. a primary-key lookup, or even vs. search. > Search doesn't intuitively feel like the right tool here, but I wonder if it > may actually be preferable since it uses term-based partitioning. > > Thanks, > > -- > Greg > Clipboard > > _______________________________________________ > 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