Secondary Indices and Storing Binary Data

Alexander Sicular siculars at
Tue May 3 11:18:51 EDT 2011

I think all that is yet to be determined, from a public standpoint (I
don't know any more than anyone not working at Basho). If secondary
indexes are implemented (interface wise) in a similar fashion as Riak
Search then I would imagine that the index would be enabled as a hook
at write time. Either a hook at write time (which I would imagine will
be the method employed) or some other mechanism, Riak would need to be
able to understand the value you are writing to disk to be able to
index it properly. Meaning that whichever way you are encoding your
object, Riak would need to be able to decode it in the two languages
that it speaks - javascript or erlang.


On Tue, May 3, 2011 at 08:55, Runar Jordahl <runar.jordahl at> wrote:
> I am working on a solution where an object graph (for example a full
> insurace contract) is serialized to binary data and stored as a single
> Riak object. Upon saving the binary data to Riak, I will extract the
> fields needed for indexing and (hopefully) use the upcoming “secondary
> indices” (
> ) to index the object based on the extracted data.
> How will this work with the upcoming secondary indices feature? Will I
> need to store all data (index data and binary data) as a single JSON
> object, using base-encoding for the binary part? Or, will I be able to
> use custom headers for the indices, storing only raw binary data as
> the main content?
> Kind regards
> Runar
> _______________________________________________
> riak-users mailing list
> riak-users at

More information about the riak-users mailing list