anchor.diff:      SearchList = get_stats_search_order(StatName, BucketName),
       get_samples_from_one_of_kind(SearchList, StatName, ClientTStamp, Window).
   
  -%% List of different types of stats
  -kinds_list(BucketName) ->
  -    ["@system", BucketName, "@query", "@index-" ++ BucketName,
  -     "@fts-" ++ BucketName, "@xdcr-" ++ BucketName, "@index", "@fts", "@cbas", "@cbas-" ++ BucketName].
  -
  -%% For many stats, their kind can be identified by their prefix.
  -get_possible_kind(StatName, BucketName) ->
  +%% For many stats, their section can be identified by their prefix.
  +guess_sections_by_pefix(StatName, BucketName) ->
       case StatName of
           "query_" ++ _Rest ->
  -            "@query";
  +            ["@query"];
           "replication" ++ _Rest ->
  -            "@xdcr-" ++ BucketName;
  -        "index" ++ _Rest ->
  -            "@index-" ++ BucketName;
  -        "fts" ++ _Rest ->
  -            "@fts-" ++ BucketName;
  +            ["@xdcr-" ++ BucketName];
           "views" ++ _Rest ->
  -            BucketName;
  +            [BucketName];
           "spatial" ++ _Rest ->
  -            BucketName;
  +            [BucketName];
           "vb_" ++ _Rest ->
  -            BucketName;
  +            [BucketName];
           "ep_" ++ _Rest ->
  -            BucketName;
  -        "cbas" ++ _Rest ->
  -            "@cbas-" ++ BucketName;
  -        _ ->
  -            kind_not_found
  +            [BucketName];
  +        Other ->
  +            case lists:takewhile(fun ($/) -> false; (_) -> true end, Other) of
  +                Other ->
  +                    [];
  +                Prefix ->
  +                    ["@" ++ Prefix,
  +                     "@" ++ Prefix ++ "-" ++ BucketName]
  +            end
       end.
   
   %%
  
positive.code: %% query related stats first.
  %%
  get_stats_search_order(StatName, BucketName) ->
      Kind = get_possible_kind(StatName, BucketName),
      case Kind of
          kind_not_found ->
              %% Some stats do not have standard prefix.
              %% In that case, we use the default search order.
              kinds_list(BucketName);
          _ ->
              %% Move "Kind" to beginning of the search list.
              [Kind | lists:delete(Kind, kinds_list(BucketName))]
      end.
  
  build_response_for_specific_stat(BucketName, StatName, Params, LocalAddr) ->
      {ClientTStamp, {Step, _, Count} = Window} =
  
negative.code: 
  section_exists("@system") ->
      true;
  section_exists("@xdcr-"++Bucket) ->
      bucket_exists(Bucket);
  section_exists(Section) ->
      case describe_section(Section) of
          undefined ->
              bucket_exists(Section);
          {_Service, undefined} ->
              true;
          {_Service, Bucket} ->
              bucket_exists(Bucket)
      end.
  
  grab_system_aggregate_op_stats(all, ClientTStamp, Window) ->
      grab_aggregate_op_stats("@system", section_nodes("@system"), ClientTStamp, Window);
  