CREATE INDEX index_2384723 IF NOT EXISTS FOR (n:Movie) ON (n.title)
call db.indexes() yield name, labelsOrTypes
where labelsOrTypes = ["Movie"]
DROP INDEX name IF EXISTS
RETURN name
要删除名称为 index_2384723 的索引和返回值:
index_2384723
Invalid input 'R': expected 'e/E' (line 3, column 2 (offset: 77))
"DROP INDEX name IF EXISTS"
^
但为什么?这是neo4j密码解析错误还是我这边的错误?我不明白...
独立查询工作
call db.indexes() yield name, labelsOrTypes
where labelsOrTypes = ["Movie"]
RETURN name
这有效。和
DROP INDEX index_2384723 IF EXISTS
这也有效...
无法使用密码获取索引。db.indexes() 返回的名称是索引的值字符串(或名称)而不是索引本身。您可以按照以下步骤将其删除。
1. List the index (or indices) that you want to remove
call db.indexes() yield name, labelsOrTypes
WITH name, labelsOrTypes where ANY (lbl in ['Movie', 'Person'] WHERE lbl in labelsOrTypes)
RETURN name, labelsOrTypes
2. Pick the index (or indices) that you want to delete and copy/paste in neo4j browser
DROP INDEX index_2384723 IF EXISTS;
DROP INDEX index_Person IF EXISTS;
3. Execute and verify
Removed 1 index, completed after 4 ms.
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句