Clarification on key filters

Jeremiah Peschka jeremiah.peschka at gmail.com
Thu May 26 09:51:46 EDT 2011


Thanks for the clarification. I'll use Ripple to generate some 'canonical' strings to work with while I do other, more nefarious, things with them.

Much appreciated. 
--- 
Jeremiah Peschka
Founder, Brent Ozar PLF


On Thursday, May 26, 2011 at 2:42 AM, Mathias Meyer wrote:

> Jeremiah,
> 
> I sure hope you have not been drinking mouthwas.
> 
> The wiki is indeed showing single key filters, and that's confusing. In hindsight, it confused me too when I worked with key filters from the wiki page for the first time. I'll make sure we put some proper examples on that page to clarify how they should end up looking when multiple are put together. 
> 
> The bottom line is that Ripple does produce proper key filter code with conditions and that you are absolutely correct in bringing up this slight confusion.
> 
> Mathias Meyer
> Developer Advocate, Basho Technologies
> 
> On Donnerstag, 26. Mai 2011 at 03:34, Jeremiah Peschka wrote:
> 
> > An MR job has 0 or more key filters. Adding a few transforms generates a lovely list of lists:
> > { "inputs":{ "bucket":"invoices" "key_filters":[["tokenize", "-", 1], ["to_lower"], ["matches", "solutions"]] }, // ... }
> > That makes sense: we've got a list of key filters. And a key filter is, in effect, a list of arguments.
> > 
> > The complex predicates are throwing me off. Looking at the spec from Ripple in filter_builder_spec.rb [1] and it's showing that 
> > 
> > subject.OR do
> > starts_with "foo"
> > ends_with "bar"
> > end
> > 
> > 
> > becomes
> > 
> > [[:or, [[:starts_with, "foo"],[:ends_with, "bar"]]]]
> > 
> > Which is not at all the same as what the wiki says an OR should look like: 
> > 
> > ["or", [["eq", "google"]], [["less_than", "g"]]]
> > 
> > Apart from the obvious difference in syntax, have I been drinking mouthwash or did the wiki suddenly switch from showing a complete key filter condition to showing an individual key filter command for AND, OR, and NOT? 
> > 
> > Jeremiah
> > _______________________________________________
> > riak-users mailing list
> > riak-users at lists.basho.com (mailto:riak-users at lists.basho.com)
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110526/724b0948/attachment.html>


More information about the riak-users mailing list