anchor.diff:  
   execute_solr_query(Query, ObjType, Db, S) ->
       Url = solr_query_url(ObjType, Db, Query),
  +    io:format("~p~n", [lists:flatten(Url)]),
       SolrDataRaw = solr_query(Url),
       % FIXME: Probably want a solr module that knows how to query solr
       % and parse its responses.
       SolrData = mochijson2:decode(SolrDataRaw),
       DocList = ej:get({<<"response">>, <<"docs">>}, SolrData),
       Ids = [ ej:get({<<"X_CHEF_id_CHEF_X">>}, Doc) || Doc <- DocList ],
  -    Docs = chef_otto:bulk_get(S, ?db_for_guid(Db), Ids),
  -    % remove couchdb revision ID from results, mark as objects for JSON
  -    % encoding.
  -    JSONDocs = [ {lists:keydelete(<<"_rev">>, 1, Doc)} || Doc <- Docs ],
  -    Ans = {[
  +    JSONDocs = case chef_otto:bulk_get(S, ?db_for_guid(Db), Ids) of
  +		   [] ->
  +		       [];
  +		   Docs ->
  +		       %% remove couchdb revision ID from results, mark as objects for JSON
  +		       %% encoding.
  +		       [{struct, lists:keydelete(<<"_rev">>, 1, Doc)} || Doc <- Docs]
  +	       end,
  +    Ans = {struct,[
               {<<"rows">>, JSONDocs},
               {<<"start">>, 0},
  -            {<<"total">>, length(Docs)}
  -           ]},
  -    couchbeam_util:json_encode(Ans).
  -
  +            {<<"total">>, length(JSONDocs)}
  +          ]},
  +    mochijson2:encode(Ans).
  +
  
positive.code:     end.
  
  transform_query(RawQuery) when is_binary(RawQuery) ->
      case lucene_syntax:parse(RawQuery) of
          Query when is_binary(Query) ->
              ibrowse_lib:url_encode(binary_to_list(Query));
          _ ->
  
negative.code:             Id;
          undefined ->
              OrgName = list_to_binary(wrq:path_info(organization_id, Req)),
              io:format("OrgName: ~p~n", [OrgName]),
              case chef_otto:fetch_org_id(S, OrgName) of
                  not_found -> throw(org_not_found);
                  Guid -> Guid
  