anchor.diff:  
   %% sort=fieldname
   %% Order by a given field. Putting a '-' in front of the field name reverts the ordering.
  -parse_query([{sort, _Sort}|Rest], Context, Result) ->
  -    parse_query(Rest, Context, Result);
  +parse_query([{sort, Sort}|Rest], Context, Result) ->
  +    parse_query(Rest, Context, add_order(Sort,Result));
   
   %% custompivot=tablename
   %% Add a join on the given custom pivot table.
  
positive.code: empty_term(_) ->
      false.
  
  
  parse_sort([], Result) ->
      Result;
  parse_sort([{sort, Sort}|Rest], Result) ->
      Sort1 = case is_atom(Sort) of
                  true -> atom_to_list(Sort);
                  false -> Sort
              end,
      parse_sort(Rest, add_order(Sort1, Result));
  parse_sort([_|Rest], Result) ->
      parse_sort(Rest, Result).
  
  
  parse_query([], _Context, Result) ->
      Result;
  
  
negative.code:                         tables=[{rsc, "rsc"}]},
      Query1 = filter_empty(Query),
      case parse_query(Query1, Context, Start) of
          #search_sql{} = S ->
              case z_utils:is_empty(S#search_sql.order) of
                  true -> add_order("-rsc.id", S);
                  false -> S
              end;
          [] -> #search_result{};
          Other -> Other
      end.
  
  
  parse_request_args(Args) ->
  