anchor.diff:      Req = search_options(Options, #rpbsearchqueryreq{q = SearchQuery, index = Index}),
       gen_server:call(Pid, {req, Req, Timeout}, CallTimeout).
   
  -%% @doc Execute a secondary index equality query. This functionality
  -%% is implemented via executing a MapReduce job with an index as the
  -%% input.
  +%% @doc Execute a secondary index equality query.
   -spec get_index(pid(), bucket(), binary(), key() | integer()) ->
                          {ok, index_result()} | {error, term()}.
   get_index(Pid, Bucket, Index, Key) ->
  
positive.code:     get_index(Pid, Bucket, Index, StartKey, EndKey, Timeout, CallTimeout).
  
  %% @doc Execute a secondary index range query with specified
  %% timeouts. This behavior is implemented via executing a MapReduce
  %% job with an index as the input.
  -spec get_index(pid(), bucket(), binary(), key() | integer(), key() | integer(), timeout(), timeout()) ->
                         {ok, index_result()} | {error, term()}.
  get_index(Pid, Bucket, Index, StartKey, EndKey, Timeout, CallTimeout) ->
    Req = #rpbindexreq{bucket=Bucket, index=Index, qtype=range,
                         range_min=StartKey, range_max=EndKey},
      gen_server:call(Pid, {req, Req, Timeout}, CallTimeout).
  
  
  %% @doc Return the default timeout for an operation if none is provided.
  %%      Falls back to the default timeout.
  
negative.code:     get_index(Pid, Bucket, Index, Key, Timeout, CallTimeout).
  
  %% @doc Execute a secondary index equality query with specified
  %% timeouts.
  -spec get_index(pid(), bucket(), binary(), key() | integer(), timeout(), timeout()) ->
                         {ok, index_result()} | {error, term()}.
  get_index(Pid, Bucket, Index, Key, Timeout, CallTimeout) ->
      Req = #rpbindexreq{bucket=Bucket, index=Index, qtype=eq, key=Key},
      gen_server:call(Pid, {req, Req, Timeout}, CallTimeout).
  
  %% @doc Execute a secondary index range query.
  -spec get_index(pid(), bucket(), binary(), key() | integer(), key() | integer()) ->
                         {ok, index_result()} | {error, term()}.
  get_index(Pid, Bucket, Index, StartKey, EndKey) ->
  