Riak Data Type + Search

Taufan Adhitya toopay at taufanaditya.com
Mon Dec 1 13:16:47 EST 2014


riakc_pb_socket:update_type/4,5 is all i need. Thanks to both of you. Would
be helpful if it's also mentioned at
docs.basho.com/riak/latest/dev/search/search-data-types

Cheers,
Taufan

2014-12-02 0:44 GMT+07:00 Christopher Meiklejohn <cmeiklejohn at basho.com>:

>
> > On Dec 1, 2014, at 12:28 PM, Taufan Adhitya <toopay at taufanaditya.com>
> wrote:
> >
> > Hey Sean, thanks for the response.
> >
> > I was looking the documentation section you've pointed, but I'm stuck on
> Counters/Sets/Maps in the Erlang client are opaque data structures that
> collect operations as you mutate them. We will associate the data structure
> with a bucket type, bucket, and key later on. part. How do associate/save
> some datatype object on some bucket/key then?
>
> Hi Taufan,
>
> The link that Sean provided has information on how to create the bucket
> type.  Taken from the included link:
>
>         riak-admin bucket-type create maps '{"props":{"datatype":"map"}}'
>
>         riak-admin bucket-type create sets '{"props":{"datatype":"set"}}'
>
>         riak-admin bucket-type create counters
> '{"props":{"datatype":"counter"}}'
>
> I’ve also got a small riak_test example which uses the Erlang client to
> create the bucket type and operate over a key.  This might provide a good
> starting place to work from.
>
> For example:
>
> Creating a search index:
> https://github.com/basho/riak_test/blob/master/tests/yz_crdt.erl#L33
>
> Updating/creating a map with a register in it:
> https://github.com/basho/riak_test/blob/master/tests/yz_crdt.erl#L50
>
> Executing this with the client:
> https://github.com/basho/riak_test/blob/master/tests/yz_crdt.erl#L56
>
> Performing a search query with the client:
> https://github.com/basho/riak_test/blob/master/tests/yz_crdt.erl#L66
>
> - Chris
>
> Christopher Meiklejohn
> Senior Software Engineer
> Basho Technologies, Inc.
> cmeiklejohn at basho.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20141202/13edaa4e/attachment.html>


More information about the riak-users mailing list