anchor.diff:  	get_suggestion/2, 
   	add_suggestion/2,
   	update_suggestion/1,
  -	update_resource/1]).
  +	update_resource/2]).
   
   
   -include_lib("erlastic_search.hrl").
  
positive.code: 	end.
  
  update_resource(Resource, ResourceId) ->
  	%fetch old suggestion
  	case erlastic_search:search(?INDEX, "suggestion", "resource_id:"++ lib_json:to_string(ResourceId)) of
  		{error, _} -> erlang:display("ERROR");
  
negative.code: 					%If suggestion found
  					SuggId = lib_json:get_field(Response, "hits.hits[0]._id"),
  					Json = lib_json:get_field(Response, "hits.hits[0]._source"), 
  					%Payload = lib_json:get_field(Response, "hits.hits[0]._source.suggest.payload"),
  					NewJson = lib_json:replace_fields(Json, [{"suggest.payload.manufacturer",Manufacturer},{"suggest.payload.model",Model},{"suggest.payload.tags",Tags},{"suggest.payload.pollng_feq",Polling_freq}]),
  
  					%Delete old suggestion
  					erlastic_search:delete_doc("sensorcloud", "suggestion", SuggId),
  					%update weight
  
  					%change input (in case model changed)
  
  					%case erlastic_search:index_doc(?INDEX, "suggestion", Suggestion) of 
  					%	{error, _Reason} -> erlang:display("Suggestion not saved ");
  