首页 > 解决方案 > Neo4j v4.1.5 社区版 CREATE INDEX 无法识别 OPTIONS

问题描述

我正在尝试使用带有 OPTIONS 的 CYPHER 在 Neo4j 4.1.5 Community Edition 上创建索引,但它不起作用。

命令:

CREATE INDEX index_content_name IF NOT EXISTS FOR (n:__Content) ON (n.name) OPTIONS { indexProvider: 'lucene+native-3.0' }

错误:

Invalid input 'O': expected whitespace, comment, ';' or end of input (line 1, column 77 (offset: 76))
"CREATE INDEX index_content_name IF NOT EXISTS FOR (n:__Content) ON (n.name) OPTIONS { indexProvider: 'lucene+native-3.0'

社区版是否禁用了此功能?

如果没有,我做错了什么?

标签: neo4jcypheroptions

解决方案


OPTIONS子句是在 Neo4j 4.2.0 中添加的(请参见此处的更改日志:https ://github.com/neo4j/neo4j/wiki/Neo4j-4.2-changelog#cypher-2 )

阅读文档时,请确保选择正确版本的 Neo4j 服务器:

在此处输入图像描述


推荐阅读