link walking stop

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

link walking stop

Tux Racer
Hello Riak Users,

I was wondering if their was an easy way (REST API or erlang API), do
stop walking the link.

For instance neo4j traverser API
http://api.neo4j.org/current/org/neo4j/graphdb/Traverser.html
has a
http://api.neo4j.org/current/org/neo4j/graphdb/StopEvaluator.html
which can be END_OF_GRAPH or DEPTH_ONE

The use case here is t hat I have a document in folders linked together
with a "parent" relationship:
i.e
/folder1/folder2/folder3/folder4/document1

where
"document1" links (tag "PARENT") to "folder4"
"folder4" links (tag "PARENT") to "folder3"
"folder3" links (tag "PARENT") to "folder3"
"folder2" links (tag "PARENT") to "folder1"

If I do a HTTP GET on
/riak/documents/document1/folders,PARENT,_/folders,PARENT,_/folders,PARENT,_/folders,PARENT,1

but I do not know in advance at which depth the document lies so do not
know how many times I need to write /folders,PARENT,_

Thanks
TuX

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: link walking stop

Justin Sheehy
Hello, TuX.

The current link-walking API exposed via simple HTTP GET does not
allow you to do that kind of document analysis.  (it is not a general
graph processing model)

Your best bet might be a series of map-reduce queries.

We hope to add a more general graph model to Riak in the future, but
the combination of link-walking's ease and map/reduce's overall
utility allow many problems to be solved well without that.

Best,

-Justin

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