Begin forwarded message:

> From: Sean Cribbs <[email protected]>
> Date: April 12, 2010 2:21:54 PM EDT
> To: Tomáš Mudruňka <[email protected]>
> Subject: Re: Riak Backlinks? Simple linkwalk?
> 
> On Apr 12, 2010, at 12:48 PM, Tomáš Mudruňka wrote:
> 
>> 
>> Hello,
>> i have 2 small questions...
>> 
>> 1.)
>> i am using Riak with PHP to store graph db, but i can't find anywhere if i
>> am able to get list of backlinks, which is crucial for me.
>> is there some way to get array of keys with links to my desired key? If
>> it's possible, how can i do this?
>> 
> 
> Links are uni-directional, from source to target.  If you need backlinks, 
> you'll need to add them to the target back to the sources.  Alternatively, 
> you could do a potentially expensive map-reduce job to collect them, but in 
> general it's easier to add the backlink when you store the forward link.
> 
>> 2.)
>> is there some way to do such simple linkwalk request in PHP?
>> curl http://localhost:8098/riak/kybca-mini/root/_,_,_; echo
>> i just want to get array containing data of all nodes to which i am
>> linking from desired node in single request.
> 
> The PHP client library supports link-walking through map-reduce rather than 
> the shortcut URLs.  If you have the object already, do something like this:
> 
> $results = $obj->link()->map("Riak.mapValuesJson", array("keep" => 
> true)).run();
> 
> Hope that helps!
> 
> Sean Cribbs <[email protected]>
> Developer Advocate
> Basho Technologies, Inc.
> http://basho.com/
> 

_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to