anchor.diff:  	end.
   
   %% @doc
  -%% Function: convert_binary_to_string/1
  -%% Purpose: convert binary parts of the list to string
  -%% Returns: Returns the list with the binary parts converted to strings
  -%% @end
  --spec convert_binary_to_string(JSONString::string()) -> string().
  -
  -convert_binary_to_string([]) ->
  -	[];
  -convert_binary_to_string([First|Rest]) ->
  -	case is_binary(First) of
  -		true -> binary_to_list(First) ++ convert_binary_to_string(Rest);
  -		false -> case is_list(First) of
  -					 true -> convert_binary_to_string(First) ++ convert_binary_to_string(Rest);
  -					 false -> [First] ++ convert_binary_to_string(Rest)
  -				 end
  -	end.
  -
  -%% @doc
   %% Function: do_any_field_exist/2
   %% Purpose: Used to check if a JSON contains any of the given fields
   %% Returns: True if at least one of the given fields exist, false otherwise
  
positive.code: %% @end 
  -spec get_and_add_id(JsonStruct::mochijson()) -> json_output_value().
  get_and_add_id(JsonStruct) ->
      Id  = get_field(JsonStruct, "_id"),
      SourceJson  = get_field(JsonStruct, "_source"),
      add_value(SourceJson, "id", Id).
  
  %% @doc 
  %% Gets the 'password' from the root, gets the '_source'. Adds password as 
  
negative.code: %% @end 
  -spec get_and_add_password(JsonStruct::mochijson()) -> json_output_value().
  get_and_add_password(JsonStruct) ->
      Id  = lib_json:get_field(JsonStruct, "fields.password"),
      SourceJson  = lib_json:get_field(JsonStruct, "_source"),
      lib_json:add_value(SourceJson, "password", Id).
  
  %% @doc 
  %% Get the search results and performs get_and_add_password/1 on each
  