Link walking example on basho blog....

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

Link walking example on basho blog....

danoyoung
I'm trying to wrap my head around the url syntax for the underscores
in the various link walking examples, both on the basho blog and in
the various docs....Can someone clarify for me the meaning of the
series of underscores and commas? ( _ , _)  On the basho blog, Link
Walking By Example article,  why are there sometimes a series of three
 (i.e. $ curl http://localhost:8098/raw/hb/first/_,_,_ ) and later in
the article there's a set of three (i.e. $ curl
http://localhost:8098/raw/hb/first/_,_,_/_,_,_ )  This may be obvious
but I don't get it right now...I have gotten the link walking working
in my own test application, mostly from the examples, but I really
don't understand the _,_...is it an Erlang thing?

Any insight would be greatly appreciated.

Regards,

Dan

_______________________________________________
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 example on basho blog....

Preston Marshall
The underscore means match all I think, or ignore.  Each one of the underscores is kind of an argument to the mapreduce/linking phase.  For example "http://localhost:8098/raw/hb/first/_,foo,_" means follow all links that are tagged "foo" in the "first" object in the hb bucket. Some of the others are a little more complex, like a bucket within a bucket etc. Maybe someone who knows more about it can chime in ;)
On Feb 26, 2010, at 11:48 PM, Dan Young wrote:

I'm trying to wrap my head around the url syntax for the underscores
in the various link walking examples, both on the basho blog and in
the various docs....Can someone clarify for me the meaning of the
series of underscores and commas? ( _ , _)  On the basho blog, Link
Walking By Example article,  why are there sometimes a series of three
(i.e. $ curl http://localhost:8098/raw/hb/first/_,_,_ ) and later in
the article there's a set of three (i.e. $ curl
http://localhost:8098/raw/hb/first/_,_,_/_,_,_ )  This may be obvious
but I don't get it right now...I have gotten the link walking working
in my own test application, mostly from the examples, but I really
don't understand the _,_...is it an Erlang thing?

Any insight would be greatly appreciated.

Regards,

Dan

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


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

smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Link walking example on basho blog....

Sean Cribbs
Yes, the _ means "match anything" or "don't care".  The three pieces of the spec are:

* bucket (only match things in this bucket)
* tag
* keep (whether to return results from this spec)

If I recall correctly, the final link-walking phase always returns results.

Sean

On 2/27/10 12:55 AM, Preston Marshall wrote:
The underscore means match all I think, or ignore.  Each one of the underscores is kind of an argument to the mapreduce/linking phase.  For example "http://localhost:8098/raw/hb/first/_,foo,_" means follow all links that are tagged "foo" in the "first" object in the hb bucket. Some of the others are a little more complex, like a bucket within a bucket etc. Maybe someone who knows more about it can chime in ;)
On Feb 26, 2010, at 11:48 PM, Dan Young wrote:

I'm trying to wrap my head around the url syntax for the underscores
in the various link walking examples, both on the basho blog and in
the various docs....Can someone clarify for me the meaning of the
series of underscores and commas? ( _ , _)  On the basho blog, Link
Walking By Example article,  why are there sometimes a series of three
(i.e. $ curl http://localhost:8098/raw/hb/first/_,_,_ ) and later in
the article there's a set of three (i.e. $ curl
http://localhost:8098/raw/hb/first/_,_,_/_,_,_ )  This may be obvious
but I don't get it right now...I have gotten the link walking working
in my own test application, mostly from the examples, but I really
don't understand the _,_...is it an Erlang thing?

Any insight would be greatly appreciated.

Regards,

Dan

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

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


_______________________________________________
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 example on basho blog....

danoyoung
In reply to this post by Preston Marshall
Thanx Preston,

Sean mentioned too that  the

"The three pieces of the spec are:

* bucket (only match things in this bucket)
* tag
* keep (whether to return results from this spec)"

Thanx guys.  Feel a bit stupid for asking.... :)

I'm really looking forward to riak  and getting ride of our SQL
implementations ;)  and I think this is the right ticket....

Regards,

Dano

On Fri, Feb 26, 2010 at 10:55 PM, Preston Marshall
<[hidden email]> wrote:

> The underscore means match all I think, or ignore.  Each one of the
> underscores is kind of an argument to the mapreduce/linking phase.  For
> example "http://localhost:8098/raw/hb/first/_,foo,_" means follow all links
> that are tagged "foo" in the "first" object in the hb bucket. Some of the
> others are a little more complex, like a bucket within a bucket etc. Maybe
> someone who knows more about it can chime in ;)
> On Feb 26, 2010, at 11:48 PM, Dan Young wrote:
>
> I'm trying to wrap my head around the url syntax for the underscores
> in the various link walking examples, both on the basho blog and in
> the various docs....Can someone clarify for me the meaning of the
> series of underscores and commas? ( _ , _)  On the basho blog, Link
> Walking By Example article,  why are there sometimes a series of three
> (i.e. $ curl http://localhost:8098/raw/hb/first/_,_,_ ) and later in
> the article there's a set of three (i.e. $ curl
> http://localhost:8098/raw/hb/first/_,_,_/_,_,_ )  This may be obvious
> but I don't get it right now...I have gotten the link walking working
> in my own test application, mostly from the examples, but I really
> don't understand the _,_...is it an Erlang thing?
>
> Any insight would be greatly appreciated.
>
> Regards,
>
> Dan
>
> _______________________________________________
> riak-users mailing list
> [hidden email]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>

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