Attempting to use secondary indexes

Antonio Rohman Fernandez rohman at mahalostudio.com
Thu Aug 4 00:47:12 EDT 2011


  

Another question... the old problem of querying smaller buckets
with MapReduce is resolved with secondary indexes?
following this
pattern => curl
http://127.0.0.1:8098/buckets/loot/index/category_bin/eq/armor i think
Riak doesn't have to check all the buckets/keys in memory to match the
one you look for as it happened on a MapReduce, right? so
http://127.0.0.1:8098/buckets/rohman_messages/index/date_int/eq/20110801
would give me all messages from Rohman ( in a personalized bucket ) for
the day 1st of August of 2011 in a much faster way,
right?
thanks

Rohman 

On Thu, 04 Aug 2011 12:38:17 +0800, Antonio
Rohman Fernandez wrote: 

> seeing OSCON's PDF... when will we be able
to have Riak 1.0 with secondary indexes out? This is an improvement that
can help me pretty well out on my project. Any ETA?
> thanks
> 
> Rohman

> 
> On Wed, 3 Aug 2011 22:02:53 -0600, Kelly McLaughlin wrote: 
> 
>>
Craig, 
>> The default backend is bit cask and if you want to use the
indexes you'll need to look in etc/app.config in the release directory
and change the value for the storage_backend setting to
riak_kv_index_backend instead of riak_kv_bitcask_backend. I suspect
that's the problem. Cheers. 
>> Kelly 
>> 
>> On Aug 3, 2011, at 9:42
PM, Craig Muth wrote: 
>> 
>>> I'm running the code example from
http://rusty.basho.com.s3.amazonaws.com/Presentations/2011-OSCONData-Portland.pdf
[1] 
>>> 
>>> THIS SUCCEEDS: 
>>> curl 
>>> -X PUT 
>>> -d
"OPAQUE_VALUE" 
>>> -H "x-riak-index-category_bin: armor" 
>>> -H
"x-riak-index-price_int: 400" 
>>>
http://127.0.0.1:8098/buckets/loot/keys/gauntlet24 [2] 
>>> THIS
VERIFIES IT'S GETTING THERE: 
>>> curl
http://127.0.0.1:8098/riak/loot/gauntlet24 [3] 
>>> => OPAQUE_VALUE 
>>>
HOWEVER, THIS FINDS NOTHING: 
>>> curl
http://127.0.0.1:8098/buckets/loot/index/category_bin/eq/armor [4] 
>>>
=> {"keys":[]} 
>>> Whereas in the presentation it says it should return
{"keys":["gauntlet24"]} 
>>> Any ideas? Just grabbed the latest from
github master. 
>>> --Craig
_______________________________________________
>>> riak-users mailing
list
>>> riak-users at lists.basho.com [5]
>>>
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
> 
>
-- 
> 
> [6]
> 
> ANTONIO ROHMAN FERNANDEZ
> CEO, Founder & Lead
Engineer
> rohman at mahalostudio.com [7] 
> PROJECTS
> MaruBatsu.es [8]
>
PupCloud.com [9]
> Wedding Album [10]

-- 

 		 [11]

 ANTONIO ROHMAN
FERNANDEZ
CEO, Founder & Lead Engineer
rohman at mahalostudio.com [12] 		 

PROJECTS
MaruBatsu.es [13]
PupCloud.com [14]
Wedding Album [15] 

  


Links:
------
[1]
http://rusty.basho.com.s3.amazonaws.com/Presentations/2011-OSCONData-Portland.pdf
[2]
http://127.0.0.1:8098/buckets/loot/keys/gauntlet24
[3]
http://127.0.0.1:8098/riak/loot/gauntlet24
[4]
http://127.0.0.1:8098/buckets/loot/index/category_bin/eq/armor
[5]
mailto:riak-users at lists.basho.com
[6] http://mahalostudio.com
[7]
mailto:rohman at mahalostudio.com
[8] http://marubatsu.es
[9]
http://pupcloud.com
[10] http://wedding.mahalostudio.com
[11]
http://mahalostudio.com
[12] mailto:rohman at mahalostudio.com
[13]
http://marubatsu.es
[14] http://pupcloud.com
[15]
http://wedding.mahalostudio.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110804/16da0328/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: blocked.gif
Type: image/gif
Size: 118 bytes
Desc: not available
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110804/16da0328/attachment.gif>


More information about the riak-users mailing list