我正在創建一個新的Neo4j數據庫。我有一種名爲User的節點,我希望用戶的屬性索引爲標識符和EmailAddress。如何在數據庫是新的時候設置索引?我注意到在neo4j.properties文件中看起來支持創建索引。然而,當我把這些作爲使Neo4j:一步一步地創建一個自動索引
# 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
,並添加一個節點和做一個查詢找到一個標識符,我知道存在
START n=node:Identifier(Identifier = "USER0")
RETURN n;
然後我得到一個
MissingIndexException: Index `Identifier` does not exist
怎麼辦我創建一個索引並在開始查詢中使用它?我只想使用配置文件和密碼來實現這一點。即目前我只能在Power Tool Console中玩。
請一定要看看下面驚奇的答案 - 如何索引工作在2.0+中簡單得多 - 正如你所說這是一個新的數據庫,所以希望移植到最新的neo4j版本是一個選項... –