anchor.diff:  -type fargs() :: {function(), args()}.
   -type extractdef() :: mfargs() | fargs().
   
  --type riak_object() :: tuple(). % no good way to define riak_object
  -
  --type extract_qfun() :: fun((riak_object(),any()) -> search_fields()).
  +-type obj() :: riak_object:riak_object().
  +
  +-type extract_qfun() :: fun((obj(),any()) -> search_fields()).
   -type args() :: any().
   
   -type index() :: binary().
  
positive.code: %% Precommit hook for riak k/v and search integration.  Executes
  %% the desired mapping on the riak object to produce a search
  %% document to store in riak search.
  %%
  -spec precommit(riak_object()) -> {fail, any()} | riak_object().
  precommit(RiakObject) ->
      Extractor = get_extractor(RiakObject),
      try
  
negative.code:             IdxDoc
      end.
   
  -spec make_index(obj()) -> binary().
  make_index(RiakObject) ->
      riak_object:bucket(RiakObject).
  
  -spec make_docid(obj()) -> binary().
  make_docid(RiakObject) ->
      riak_object:key(RiakObject).
      
  %% Run the extraction function against the RiakObject to get a list of
  %% search fields and data
  -spec run_extract(obj(), string(), extractdef()) -> search_fields().
  run_extract(RiakObject, DefaultField, {M, F, A}) ->
      M:F(RiakObject, DefaultField, A);
  run_extract(RiakObject, DefaultField, {F, A}) ->
  