diff --git a/lib/neography/rest.rb b/lib/neography/rest.rb index da7fb4b..4dc816a 100644 --- a/lib/neography/rest.rb +++ b/lib/neography/rest.rb @@ -473,7 +473,15 @@ def get_batch(args) else {:method => "POST", :to => @cypher_path, :body => {:query => args[1]}} end - else + when :remove_node_from_index + case args.size + when 5 then {:method => "DELETE", :to => "/index/node/#{args[1]}/#{args[2]}/#{args[3]}/#{get_id(args[4])}" } + when 4 then {:method => "DELETE", :to => "/index/node/#{args[1]}/#{args[2]}/#{get_id(args[3])}" } + when 3 then {:method => "DELETE", :to => "/index/node/#{args[1]}/#{get_id(args[2])}" } + end + when :delete_node + {:method => "DELETE", :to => "/node/#{get_id(args[1])}"} + else raise "Unknown option #{args[0]}" end end