Object metadata via NodeJS client

José Ghislain Quenum jose.quenum at googlemail.com
Fri Apr 10 07:23:23 EDT 2015


Hi Luke,
a couple of questions regarding indexing and map reduce.
First of all, if I have an object to which I want to attach several indices
I can just go on with addIndex and chain them. right?

Also, if I want to use key filters in a map-reduce call, where should I put
them? In the inputs entry?
Second, if I want to access links in a map reduce, can I call the link
function right after the inputs? any example?
Finally, when I use map reduce to fetch objects attached to an index, how
should I do.

thanks in advance for advising on all these questions.
José

On Thu, Apr 9, 2015 at 3:37 PM, Jose G. Quenum <jose.quenum at googlemail.com>
wrote:

> Alright cool! Thanks a bunch
>
> Sent from my iPad
>
> > On Apr 8, 2015, at 9:20 PM, Luke Bakken <lbakken at basho.com> wrote:
> >
> > José,
> >
> > Check out the following methods in the document:
> >
> > http://basho.github.io/riak-nodejs-client/classes/RiakObject.html
> >
> > hasLinks()
> > getLinks()
> > setLinks()
> >
> > --
> > Luke Bakken
> > Engineer
> > lbakken at basho.com
> >
> >
> > On Wed, Apr 8, 2015 at 8:56 AM, Jose G. Quenum
> > <jose.quenum at googlemail.com> wrote:
> >> Thanks a bunch Luke. It's now getting clear. However the links
> manipulation is not available yet on the API docs. I guess it's just a
> matter of update.
> >> I will now start re implementing my riak data access with this client.
> When I get questions I will turn to you guys.
> >> Regards
> >> Jose
> >>
> >> Sent from my iPad
> >>
> >>> On Apr 7, 2015, at 6:50 PM, Luke Bakken <lbakken at basho.com> wrote:
> >>>
> >>> Hi José,
> >>>
> >>> Please refer to this document:
> >>>
> >>> http://basho.github.io/riak-nodejs-client/classes/RiakObject.html
> >>>
> >>> When you retrieve a value, you get a RiakObject back:
> >>>
> >>> client.fetchValue({ bucket: 'test', key: 'foo' }, function (err, rslt)
> {
> >>>   var riakObj = rslt.values.shift();
> >>> });
> >>>
> >>> This RiakObject exposes several methods related to metadata.
> >>>
> >>> I just released version 1.1.0 which adds support for links. You'll see
> >>> that in the API docs now.
> >>>
> >>> --
> >>> Luke Bakken
> >>> Engineer
> >>> lbakken at basho.com
> >>>
> >>>
> >>> On Tue, Apr 7, 2015 at 5:27 AM, José Ghislain Quenum
> >>> <jose.quenum at googlemail.com> wrote:
> >>>> Luke,
> >>>> In my current implementation, I use metadata for both links and
> secondary
> >>>> index.
> >>>>
> >>>>> On Mon, Apr 6, 2015 at 4:03 PM, Luke Bakken <lbakken at basho.com>
> wrote:
> >>>>>
> >>>>> Hi José,
> >>>>>
> >>>>> Other than links, what object metadata are you trying to access or
> modify?
> >>>>>
> >>>>> Thanks -
> >>>>>
> >>>>> --
> >>>>> Luke Bakken
> >>>>> Engineer
> >>>>> lbakken at basho.com
> >>>>>
> >>>>>
> >>>>> On Sat, Apr 4, 2015 at 6:56 AM, José Ghislain Quenum
> >>>>> <jose.quenum at googlemail.com> wrote:
> >>>>>> Thanks Brian for your reply and trying to work out the links part.
> I
> >>>>>> took a look at the RiakObject and could see how to manipulate it
> with
> >>>>>> FetchValue and the Secondary Index. However, I failed to figure out
> >>>>>> how to access the meta while reading an object. Just as an example,
> >>>>>> when you're updating an object you could be using some meta data,
> and
> >>>>>> some of them come from a prior read.
> >>>>>>
> >>>>>> If you could just share some examples with code  that'd be very
> helpful.
> >>>>>>
> >>>>>> Thanks José
> >>>>
> >>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20150410/58752eff/attachment-0002.html>


More information about the riak-users mailing list