anchor.diff:              }
           end, [<<"master">> | VBuckets]).
   
  -
  -build_remote_specs(Node, BucketName, FullViewName, VBuckets, Config) ->
  +build_remote_simple_specs(Node, BucketName, FullViewName, VBuckets, Config) ->
       MergeURL = iolist_to_binary(capi_utils:capi_url(Node, "/_view_merge", "127.0.0.1", Config)),
       Props = {[
           {<<"views">>,
  
positive.code:     NodeToVBuckets.
  
  
  view_merge_params(Req, #db{name = BucketName} = Db, DDocId, ViewName) ->
      NodeToVBuckets = node_vbuckets_dict(?b2l(BucketName)),
      Config = ns_config:get(),
      FullViewName = case DDocId of
      nil ->
          % _all_docs and other special builtin views
          ViewName;
      _ ->
          iolist_to_binary([BucketName, "%2F", "master", $/, DDocId, $/, ViewName])
      end,
      ViewSpecs = dict:fold(
          fun(Node, VBuckets, Acc) when Node =:= node() ->
              build_local_specs(BucketName, DDocId, ViewName, VBuckets) ++ Acc;
          (Node, VBuckets, Acc) ->
             [build_remote_specs(Node, BucketName, FullViewName, VBuckets, Config) | Acc]
          end, [], NodeToVBuckets),
      view_merge_params(Req, Db, DDocId, ViewName, ViewSpecs).
  
  
negative.code: vbucket_db_name(BucketName, VBucket) ->
      iolist_to_binary([BucketName, $/, integer_to_list(VBucket)]).
  
  use_set_views(Req) ->
      get_value("superstar", (Req#httpd.mochi_req):parse_qs(), "true") =:= "true".
  
  build_local_specs(Req, BucketName, DDocId, ViewName, VBuckets) ->
      case use_set_views(Req) of
          true ->
              build_local_set_specs(BucketName, DDocId, ViewName, VBuckets);
          false ->
              build_local_simple_specs(BucketName, DDocId, ViewName, VBuckets)
      end.
  
  build_remote_specs(Req, Node, BucketName, DDocId, ViewName, VBuckets, Config) ->
      case use_set_views(Req) of
          true ->
              FullViewName = iolist_to_binary([DDocId, $/, ViewName]),
              build_remote_set_specs(Node, BucketName,
                                     FullViewName, VBuckets, Config);
          false ->
              FullViewName = iolist_to_binary([BucketName, "%2F", "master", $/,
                                               DDocId, $/, ViewName]),
              build_remote_simple_specs(Node, BucketName,
                                        FullViewName, VBuckets, Config)
      end.
  
  build_local_set_specs(BucketName, DDocId, ViewName, VBuckets) ->
      [#set_view_spec{
           name = BucketName,
           ddoc_id = DDocId,
           view_name = ViewName,
           partitions = VBuckets
       }].
  
  build_remote_set_specs(Node, BucketName, FullViewName, VBuckets, Config) ->
      MergeURL = iolist_to_binary(capi_utils:capi_url(Node, "/_view_merge",
                                                      "127.0.0.1", Config)),
  
      Sets = {[
          {BucketName, {[{<<"view">>, FullViewName},
                         {<<"partitions">>, VBuckets}]}}
      ]},
  
      Props = {[
          {<<"views">>,
              {[{<<"sets">>, Sets}]}}
      ]},
      #merged_view_spec{url = MergeURL, ejson_spec = Props}.
  
  build_local_simple_specs(BucketName, DDocId, ViewName, VBuckets) ->
      DDocDbName = iolist_to_binary([BucketName, $/, "master"]),
      lists:map(fun(VBucket) ->
              #simple_view_spec{
  