So! I think that I have to be more explicit
I have run a test mapred query using two simple map functions, each one
returns the input object (in a list). but by runnin the query I get a
badmatch error
Map1 = fun(O,_,_) -> [O] end.
Map2 = fun(O, _,_) -> [O] end.
C:mapred_bucket(<<"b7bc1418-198d-44a3-8835-8aa9cb416d5b">>, [{map, {qfun,
Map1}, none, false}, {map, {qfun, Map2}, none, true}]).
{{badmatch,{r_object,<<"b7bc1418-198d-44a3-8835-8aa9cb416d5b">>,
<<255,230,193,167,254,7,246,64,154,190,36,236,32,232,189,
169,161,124,23,86>>,
[{r_content,{dict,2,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],...},
{{[],[],[],[],[],[],[],[],[],...}}},
<<"12d33872-4c92-4da5-9d16-5036a8059253">>}],
[{<<5,215,86,61>>,{1,63487018636}}],
{dict,1,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],...},
{{[],[],[],[],[],[],[],[],[],[],...}}},
undefined}},
[{riak_kv_map_phase,build_input,2},
{riak_kv_map_phase,'-handle_input/3-lc$^0/1-0-',2},
{riak_kv_map_phase,handle_input,3},
{luke_phase,executing,2},
{gen_fsm,handle_msg,7},
{proc_lib,init_p_do_apply,3}]}
I'm using riak_search-0.14.2
Erlang R14B03 (erts-5.8.4)
On Fri, Oct 28, 2011 at 3:02 PM, Jeremiah Peschka <
[email protected]> wrote:
> A list.
> ---
> Jeremiah Peschka - Founder, Brent Ozar PLF, LLC
> Microsoft SQL Server MVP
>
> On Oct 28, 2011, at 6:59 AM, Lyes zaiko wrote:
>
> > Hi all!
> >
> > I want to execute a mapreduce query, in erlang, that contains two map
> phases such that the Map2 function takes the result of the Map1 function as
> input. Is it possible and if, what must be the return value of each map
> phase
> >
> > Thank you!
> > _______________________________________________
> > riak-users mailing list
> > [email protected]
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com