Add the following to the neo4j.properties file
# Autoindexing
# Enable auto-indexing for nodes, default is false
node_auto_indexing=true
# The node property keys to be auto-indexed, if enabled
node_keys_indexable=EmailAddress,Identifier
Create the auto index for nodes
neo4j-sh (0)$ index --create node_auto_index -t Node
Check if they exist
neo4j-sh (0)$ index --indexes
Should return
Node indexes:
node_auto_index
When querying use the following syntax to specify the index
start a = node:node_auto_index(Identifier="USER0")
return a;
As the node is auto indexed the name of the index is node_auto_index
This information came from a comment at the bottom of this page
Update
In case you want to index your current data which was there before automatic indexing was turned on (where Property_Name is the name of your index)
START nd =node(*)
WHERE has(nd.Property_Name)
WITH nd
SET nd.Property_Name = nd.Property_Name
RETURN count(nd);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…