Clarification on key filters

Mathias Meyer mathias at
Thu May 26 05:42:53 EDT 2011


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 (mailto:riak-users at

More information about the riak-users mailing list