anchor.diff:    non_neg_integer(),
     state()
   ) -> sumo_store:result([sumo_internal:doc()], state()).
  -find_by(DocName,
  -        Conditions,
  -        Limit,
  -        Offset,
  +find_by(DocName, Conditions, Limit, Offset,
           #state{conn = Conn,
                  bucket = Bucket,
                  index = Index,
  -               get_opts = Opts} = State) ->
  +               get_opts = Opts} = State) when is_list(Conditions) ->
     IdField = sumo_internal:id_field_name(DocName),
     case lists:keyfind(IdField, 1, Conditions) of
       {_K, Key} ->
  -      case fetch_map(Conn, Bucket, iolist_to_binary(Key), Opts) of
  +      case fetch_map(Conn, Bucket, to_bin(Key), Opts) of
           {ok, RMap} ->
             Val = rmap_to_doc(DocName, RMap),
             {ok, [Val], State};
  
positive.code:         {ok, {_, Res}} -> {ok, Res, State};
          {error, Error} -> {error, Error, State}
        end
    end.
  
  -spec find_by(
  
negative.code:   riakc_pb_socket:search(Conn, Index, Query, [{start, Offset}, {rows, Limit}]).
  
  -spec build_query(sumo:conditions()) -> binary().
  build_query(Conditions) ->
    build_query1(Conditions).
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %% Private API.
  