anchor.diff:  %% cat=category1,category2
   %% Filter results on a certain category.
   map_search_field({cat, Cat}, _Context) ->
  -    ?DEBUG(Cat),
       {["+category:", as_category(Cat)],
        []};
   
  
positive.code: %% Give more documents which are similar to <Id>  (solr only)
  map_search_field({morelikethis_id, [Id, Amount]}, _Context) ->
      {["id:", z_convert:to_list(Id), " -category:meta"],
       [{morelikethis, "o,match_title,summary,category", Amount}]};
  
  %% Specifying the return format. Either 'default' (empty) or 'ranked'.
  map_search_field({return_format, _}, _Context) ->
  
negative.code:             %% "More like this id" gives us a search result with 1 doc, but
              %% the interesting stuff is in the 'morelikethis' property of the
              %% search.
              Props = case proplists:get_value(morelikethis, Result#search_result.result, {obj, []}) of
                          {obj, []} ->
                              [{"numFound", "0"}, {"docs", []}];
                          {obj, [{_, {obj, Props0}}]} ->
                              Props0;
                          Huh ->
                              lager:warning("Huh: ~p", [Huh]),
                              Huh
                      end,
              %% Extract the matching ids and the total number found
              Ids = [DocId || {obj, [{"id", DocId}]} <- proplists:get_value("docs", Props)],
              {"numFound", Total} = proplists:lookup("numFound", Props),
  