Skip to content

Commit

Permalink
fix add node to index
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenGardenDubai committed Oct 17, 2011
1 parent 0aee952 commit a346ddc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ GEM
httparty (0.7.4)
crack (= 0.1.8)
json (1.4.6)
json (1.4.6-java)
net-http-spy (0.2.1)
rake (0.8.7)
rspec (2.0.1)
Expand All @@ -34,6 +35,6 @@ PLATFORMS
DEPENDENCIES
fakeweb (~> 1.3.0)
neography!
net-http-spy (~> 0.2.1)
net-http-spy (= 0.2.1)
rake (~> 0.8.7)
rspec (~> 2.0.0.beta.22)
5 changes: 3 additions & 2 deletions lib/neography/rest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,9 @@ def create_node_index(name, type = "exact", provider = "lucene")
end

def add_node_to_index(index, key, value, id)
options = { :body => (self.configuration + "/node/#{get_id(id)}").to_json, :headers => {'Content-Type' => 'application/json'} }
post("/index/node/#{index}/#{key}/#{value}", options)
options = { :body => ({:uri => self.configuration + "/node/#{get_id(id)}", :key => key, :value => value }).to_json, :headers => {'Content-Type' => 'application/json'} }
#post("/index/node/#{index}/#{key}/#{value}", options)
post("/index/node/#{index}", options)
end

def remove_node_from_index(*args)
Expand Down
2 changes: 1 addition & 1 deletion neography.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]

s.add_development_dependency "rspec", "~> 2.0.0.beta.22"
s.add_development_dependency "net-http-spy", "~> 0.2.1"
s.add_development_dependency "net-http-spy", "0.2.1"
s.add_development_dependency "fakeweb", "~> 1.3.0"
s.add_development_dependency "rake", "~> 0.8.7"
s.add_dependency "httparty", "~> 0.7.3"
Expand Down

0 comments on commit a346ddc

Please sign in to comment.