From 9b971301c7742b06fcd9529d9de2f9e52590e35e Mon Sep 17 00:00:00 2001 From: Hesham Amiri Date: Mon, 17 Oct 2011 09:03:59 +0400 Subject: [PATCH] fix add relationship to index --- lib/neography/rest.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/neography/rest.rb b/lib/neography/rest.rb index 7e2daba..52abac5 100644 --- a/lib/neography/rest.rb +++ b/lib/neography/rest.rb @@ -284,8 +284,8 @@ def create_relationship_index(name, type = "exact", provider = "lucene") end def add_relationship_to_index(index, key, value, id) - options = { :body => (self.configuration + "/relationship/#{get_id(id)}").to_json, :headers => {'Content-Type' => 'application/json'} } - post("/index/relationship/#{index}/#{key}/#{value}", options) + options = { :body => ({:uri => self.configuration + "/relationship/#{get_id(id)}", :key => key, :value => value}).to_json, :headers => {'Content-Type' => 'application/json'} } + post("/index/relationship/#{index}", options) end def remove_relationship_from_index(*args)