在Neo4j中使用嵌套属性(带点)删除索引

时间:2018-05-21 17:36:06

标签: neo4j cypher neo4j-driver

我正在使用Neo4j和Bolt以及Java中的Neo4j驱动程序。当我试图跑 以下命令:

DROP INDEX ON :SingleBoardComputer(id.id)

请注意,该属性的名称实际上是“id.id”(基本上带有一个点)。

我有以下错误:

Neo.ClientError.Statement.SyntaxError: Invalid input '\': expected whitespace or a list of property key names (line 1, column 36 (offset: 35))
"DROP INDEX ON :SingleBoardComputer(id.id)"

有没有办法使用驱动程序删除索引?

我正在使用Neo4j 3.3.5和neo4j驱动程序1.6.1

我很惊讶,因为我可以毫无问题地创建索引。

由于

1 个答案:

答案 0 :(得分:2)

解决方案是逃离现场:

DROP INDEX ON :SingleBoardComputer(`id.id`)