anchor.diff:  %% @doc Repair the index at the given `Partition'.
   -spec repair(partition()) ->
                       {ok, Pairs::[{partition(), node()}]} |
  -                    {down, Down::[{partition(), node()}]}.
  +                    {down, Down::[{partition(), node()}]} |
  +                    ownership_change_in_progress.
   repair(Partition) ->
       Service = riak_search,
       MP = {?MODULE, Partition},
       FilterModFun = {?MODULE, repair_filter},
       riak_core_vnode_manager:repair(Service, MP, FilterModFun).
  +
  +%% @doc Given a `Target' partition generate a `Filter' fun to use
  +%%      during partition repair.
  +-spec repair_filter(partition()) -> Filter::function().
  +repair_filter(Target) ->
  +    {ok, Ring} = riak_core_ring_manager:get_my_ring(),
  +    riak_core_repair:gen_filter(Target,
  +                                Ring,
  +                                schema_nval_map(),
  +                                default_object_nval(),
  +                                fun object_info/1).
   
   %% @doc Get the status of the repair process for the given `Partition'.
   -spec repair_status(partition()) -> no_repair | repair_in_progress.
  
positive.code: %% -------------------------------------------------------------------
  %%
  %% Copyright (c) 2007-2010 Basho Technologies, Inc.  All Rights Reserved.
  %%
  %% -------------------------------------------------------------------
  
  
negative.code:     {reply, Reply, VState#vstate{bstate=NewBState}}.
  
  %% @private
  default_object_nval() ->
      riak_core_bucket:n_val(riak_core_config:default_bucket_props()).
  
  %% @private
  object_info({I, {F, T}}) ->
      Hash = riak_search_ring_utils:calc_partition(I, F, T),
      {I, Hash}.
  
  %% @private
  schema_nval_map() ->
      [{S:name(), S:n_val()} || S <- riak_search_config:get_all_schemas()].
  