module Neography::Rest::NodeAutoIndexes
Public Instance Methods
add_node_auto_index_property(property)
click to toggle source
# File lib/neography/rest/node_auto_indexes.rb, line 45 def add_node_auto_index_property(property) options = { :body => property, :headers => json_content_type } @connection.post("/index/auto/node/properties", options) end
find_node_auto_index(key_or_query, value = nil)
click to toggle source
# File lib/neography/rest/node_auto_indexes.rb, line 11 def find_node_auto_index(key_or_query, value = nil) if value index = find_node_auto_index_by_value(key_or_query, value) else index = query_node_auto_index(key_or_query) end return nil if index.empty? index end
find_node_auto_index_by_value(key, value)
click to toggle source
# File lib/neography/rest/node_auto_indexes.rb, line 21 def find_node_auto_index_by_value(key, value) @connection.get("/index/auto/node/%{key}/%{value}" % {:key => key, :value => encode(value)}) || [] end
get_node_auto_index(key, value)
click to toggle source
# File lib/neography/rest/node_auto_indexes.rb, line 5 def get_node_auto_index(key, value) index = @connection.get("/index/auto/node/%{key}/%{value}" % {:key => key, :value => encode(value)}) || [] return nil if index.empty? index end
get_node_auto_index_properties()
click to toggle source
# File lib/neography/rest/node_auto_indexes.rb, line 41 def get_node_auto_index_properties @connection.get("/index/auto/node/properties") end
get_node_auto_index_status()
click to toggle source
# File lib/neography/rest/node_auto_indexes.rb, line 29 def get_node_auto_index_status @connection.get("/index/auto/node/status") end
query_node_auto_index(query_expression)
click to toggle source
# File lib/neography/rest/node_auto_indexes.rb, line 25 def query_node_auto_index(query_expression) @connection.get("/index/auto/node/?query=%{query}" % {:query => encode(query_expression)}) || [] end
remove_node_auto_index_property(property)
click to toggle source
# File lib/neography/rest/node_auto_indexes.rb, line 53 def remove_node_auto_index_property(property) @connection.delete("/index/auto/node/properties/%{property}" % {:property => property}) end
set_node_auto_index_status(value = true)
click to toggle source
# File lib/neography/rest/node_auto_indexes.rb, line 33 def set_node_auto_index_status(value = true) options = { :body => value.to_json, :headers => json_content_type } @connection.put("/index/auto/node/status", options) end