Skip to content
Max De Marzi edited this page Aug 30, 2013 · 3 revisions

List indexes

@neo.list_node_indexes                                     # gives names and query templates for all defined indices

Create index

@neo.create_node_index(name, type, provider)               # creates an index, defaults are "exact" and "lucene"
@neo.create_node_auto_index(type, provider)                # creates an auto index, defaults are "exact" and "lucene"

Add node

@neo.add_node_to_index(index, key, value, node1)           # adds a node to the index with the given key/value pair

Remove node from index

@neo.remove_node_from_index(index, key, value, node1)      # removes a node from the index with the given key/value pair
@neo.remove_node_from_index(index, key, node1)             # removes a node from the index with the given key
@neo.remove_node_from_index(index, node1)                  # removes a node from the index

Get node from index

@neo.get_node_index(index, key, value)                     # exact query of the node index with the given key/value pair
@neo.find_node_index(index, key, value)                    # advanced query of the node index with the given key/value pair
@neo.find_node_index(index, query)                         # advanced query of the node index with the given query
@neo.get_node_auto_index(key, value)                       # exact query of the node auto index with the given key/value pair
@neo.find_node_auto_index(query)                           # advanced query of the node auto index with the given query

Drop a node index

@neo.drop_node_index(index)                                # drop a node index