anchor.diff:  is_index_input(_) -> false.
   
   parse_index_input(Inputs) ->
  -    Bucket   = proplists:get_value(<<"bucket">>, Inputs),
  +    Bucket   = normalize_bucket_and_type(proplists:get_value(<<"bucket">>, Inputs)),
       Index    = proplists:get_value(<<"index">>, Inputs),
       Key      = proplists:get_value(<<"key">>, Inputs),
       StartKey = proplists:get_value(<<"start">>, Inputs),
  
positive.code:     Results;
  jsonify_bkeys(Results, HasMRQuery) when HasMRQuery == false ->
      jsonify_bkeys_1(Results, []).
  jsonify_bkeys_1([{{B, K},D}|Rest], Acc) ->
      jsonify_bkeys_1(Rest, [[B,K,D]|Acc]);
  jsonify_bkeys_1([{B, K}|Rest], Acc) ->
  
negative.code: 
      JSON2 = <<"{\"bucket\":\"mybucket\",\"index\":\"myindex_bin\", \"start\":\"vala\", \"end\":\"valb\"}">>,
      Expected2 = {ok, {index, <<"mybucket">>, <<"myindex_bin">>, <<"vala">>, <<"valb">>}},
      ?assertEqual(Expected2, parse_inputs(mochijson2:decode(JSON2))),
  
      JSON3 = <<"{\"bucket\":[\"mytype\",\"mybucket\"],\"index\":\"myindex_bin\", \"start\":\"vala\", \"end\":\"valb\"}">>,
      Expected3 = {ok, {index, {<<"mytype">>,<<"mybucket">>}, <<"myindex_bin">>, <<"vala">>, <<"valb">>}},
      ?assertEqual(Expected3, parse_inputs(mochijson2:decode(JSON3))).
  
  keyfilter_input_test() ->
      JSON = <<"{\"bucket\":\"mybucket\",\"key_filters\":[[\"match\", \"key.*\"]]}">>,
      Expected = {ok, {<<"mybucket">>, [[<<"match">>, <<"key.*">>]]}},
      ?assertEqual(Expected, parse_inputs(mochijson2:decode(JSON))),
  
      JSON2 = <<"{\"bucket\":[\"mytype\", \"mybucket\"],\"key_filters\":[[\"match\", \"key.*\"]]}">>,
      Expected2 = {ok, {{<<"mytype">>,<<"mybucket">>}, [[<<"match">>, <<"key.*">>]]}},
      ?assertEqual(Expected2, parse_inputs(mochijson2:decode(JSON2))).
  
  
  -define(DISCRETE_ERLANG_JOB, <<"{\"inputs\": [[\"foo\", \"bar\"]], \"query\":[{\"map\":{\"language\":\"erlang\","
                                "\"module\":\"foo\", \"function\":\"bar\", \"keep\": false}}]}">>).
  