anchor.diff:              % chef_authn:validate_headers(GetHeader, 300),
               % transform query first to avoid possible db fetch for org
               % guid for bad queries
  -            Query = transform_query(wrq:get_qs_value("q", Req)),
  +            Query = transform_query(http_uri:decode(wrq:get_qs_value("q", Req))),
               {false, Req, State1#state{solr_query = Query}}
           catch
               throw:Why ->
  
positive.code:     end.
  
  transform_query(RawQuery) when is_binary(RawQuery) ->
      case chef_lucene:parse(RawQuery) of
          Query when is_binary(Query) ->
              ibrowse_lib:url_encode(binary_to_list(Query));
  
negative.code:     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],
      io:format("~p~n", [JSONDocs]),
      Ans = {[
              {<<"rows">>, JSONDocs},
              {<<"start">>, 0},
              {<<"total">>, length(JSONDocs)}
            ]},
      ejson:encode(Ans).
  
  