anchor.diff:      end.
   
   %% Make an indexed document under Index/DocId from the RiakObject
  --spec make_indexed_doc(index(), docid(), riak_object(), extractdef()) -> ok.
  +-spec make_indexed_doc(index(), docid(), riak_object(), extractdef()) -> idxdoc().
   make_indexed_doc(Index, DocId, RiakObject, Extractor) ->
  -    Fields = run_extract(RiakObject, Extractor),
  -    IdxDoc0 = riak_indexed_doc:new(DocId, Fields, [], Index),
  -    {ok, IdxDoc} = riak_indexed_doc:analyze(IdxDoc0),
  -    IdxDoc.
  -                         
  +    case riak_kv_util:is_x_deleted(RiakObject) of
  +        true ->
  +            deleted;
  +        false ->
  +            Fields = run_extract(RiakObject, Extractor),
  +            IdxDoc0 = riak_indexed_doc:new(DocId, Fields, [], Index),
  +            {ok, IdxDoc} = riak_indexed_doc:analyze(IdxDoc0),
  +            IdxDoc
  +    end.
  + 
   -spec make_index(riak_object()) -> binary().
   make_index(RiakObject) ->
       riak_object:bucket(RiakObject).
  
positive.code: 
      %% If all ok, remove the old entries and index the new
      remove_old_entries(RiakClient, SearchClient, Index, DocId),
      Postings = riak_indexed_doc:postings(NewIdxDoc),
      SearchClient:index_terms(Postings),
  
      %% Store the indexed_doc for next time
      riak_indexed_doc:put(RiakClient, NewIdxDoc),
      ok.
  
  %% Remove any old index entries if they exist
  -spec remove_old_entries(riak_client(), search_client(), index(), docid()) -> ok.
  
negative.code:                          {user_funterm(), args()}) -> {funterm(), args()}.
  validate_extractor(undefined) ->
      {?DEFAULT_EXTRACTOR, ?DEFAULT_ARGS};
  validate_extractor({struct, JsonExtractor}) ->
      Lang = proplists:get_value(<<"language">>, JsonExtractor),    
      validate_extractor(erlify_json_funterm(Lang, JsonExtractor));
  validate_extractor({FunTerm, Args}) when is_tuple(FunTerm) ->
      {validate_funterm(FunTerm), Args};
  validate_extractor(FunTerm) ->
  