anchor.diff:          ok = ?csv_call(set_partition_states,
                          [SetName, DDocId, Active, Passive, Cleanup]),
   
  -        ok = ?csv_call(add_replica_partitions, [SetName, DDocId, Replica]),
  -        ok = ?csv_call(remove_replica_partitions,
  -                       [SetName, DDocId, ReplicaCleanup])
  +        case UseReplicaIndex of
  +            true ->
  +                ok = ?csv_call(add_replica_partitions,
  +                               [SetName, DDocId, Replica]),
  +                ok = ?csv_call(remove_replica_partitions,
  +                               [SetName, DDocId, ReplicaCleanup]);
  +            false ->
  +                ok
  +        end
  +
       catch
           throw:{not_found, deleted} ->
               %% The document has been deleted but we still think it's
  
positive.code:             ok
      end.
  
  apply_map(Bucket, DDocs, OldMap, NewMap) ->
      ?views_info("Applying map to bucket ~s:~n~p", [Bucket, NewMap]),
  
      {Active, Passive, Cleanup, Replica, ReplicaCleanup} =
  
negative.code: 
              Passive = ordsets:subtract(ordsets:union(Passive1, Passive2),
                                         Active),
  
              case UseReplicaIndex of
                  true ->
                      Replica1 = matching_replica_vbuckets(
                                   fun (State) ->
                                           State =:= replica
                                   end, Map, VBucketStates),
  
                      %% vbucket is replica according to fastforward map but
                      %% vbucket map has not yet changed for some reason
                      Replica2 = matching_replica_vbuckets(
                                   fun (State) ->
                                           State =:= replica
                                   end, FFMap, VBucketStates),
  
                      Replica =
                          ordsets:subtract(ordsets:union([Replica1, Replica2]),
                                           Passive);
                  false ->
                      Replica = []
              end,
  
              [{active, Active},
               {passive, Passive},
  