Rebuild of label index in neo4j

我的梦境 提交于 2019-12-24 10:35:51

问题


My Neo4J instance suddenly stopped working, I think my drive ran out of space due to some unrelated logfiles. Anyway, now I cannot start Neo4J, it start, over and over again. If i check the consistency of the database I get the following message. (It does not work neither on version 3.3.5 or 3.4.1)

WARN : Label index was not properly shutdown and rebuild is required. Label index: neostore.labelscanstore.db WARN : Index was not properly shutdown and rebuild is required. Index[ IndexRule[id=1, descriptor=Index( GENERAL, :label0 ), provider={key=lucene, version=1.0}] ] WARN : Index was not properly shutdown and rebuild is required. Index[ IndexRule[id=3, descriptor=Index( GENERAL, :label1 ), provider={key=lucene, version=1.0}] ]

I see that there are a few very old answers related to something that might be similar. Are they still valid or how am I supposed to solve this?

When I try to start Neo4J I get

Nov 23 15:36:08 v22018054377066500.supersrv.de systemd[1]: neo4j.service: Start request repeated too quickly. Nov 23 15:36:08 v22018054377066500.supersrv.de systemd[1]: neo4j.service: Failed with result 'exit-code'. Nov 23 15:36:08 v22018054377066500.supersrv.de systemd[1]: Failed to start Neo4j Graph Database. root@v22018054377066500:~# service neo4j start root@v22018054377066500:~# service neo4j status ● neo4j.service - Neo4j Graph Database Loaded: loaded (/lib/systemd/system/neo4j.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Fri 2018-11-23 15:36:21 CET; 2ms ago Process: 22073 ExecStart=/usr/share/neo4j/bin/neo4j console (code=exited, status=1/FAILURE)


回答1:


Recently, I was in the same starting situation. At the end of the day the removal and recreation of all indices and constrains solved my issue.

DROP INDEX ON :Person(name)
DROP CONSTRAINT ON (p:Person) ASSERT p.name IS UNIQUE

CREATE INDEX ON :Person(name)
CREATE CONSTRAINT ON (p:Person) ASSERT p.name IS UNIQUE



回答2:


I ended up exporting to Graphml using apoc and importing again, that solved it



来源:https://stackoverflow.com/questions/53444735/rebuild-of-label-index-in-neo4j

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!