我的数据库似乎被搞砸了。约束失败,相应的索引被标记为“FAILED”(见下文)。
我认为删除/重新创建约束或索引会重建它,但是没有 - 当我尝试创建时,我被告知它已经存在,而当我删除时,我被告知它不存在。
关于如何(a)避免陷入这种情况以及(b)如何摆脱这种情况的任何想法?
Neo 的任何人都希望我的数据库查看(它不是很大 - 可能是 50MB)?
neo4j-sh (?)$ schema
Indexes
ON :Interest(uvid) FAILED (for uniqueness constraint)
ON :Interest(uiid) ONLINE (for uniqueness constraint)
ON :Offer(uoid) ONLINE (for uniqueness constraint)
ON :Product(upid) ONLINE (for uniqueness constraint)
ON :User(uuid) ONLINE (for uniqueness constraint)
Constraints
ON (user:User) ASSERT user.uuid IS UNIQUE
ON (product:Product) ASSERT product.upid IS UNIQUE
ON (interest:Interest) ASSERT interest.uiid IS UNIQUE
ON (offer:Offer) ASSERT offer.uoid IS UNIQUE
neo4j-sh (?)$ create constraint on (i:Interest) assert i.uvid is unique;
CypherExecutionException: Already constrained CONSTRAINT ON ( interest:Interest ) ASSERT interest.uvid IS UNIQUE.
neo4j-sh (?)$ drop constraint on (i:Interest) assert i.uvid is unique;
CypherExecutionException: Unable to drop CONSTRAINT ON ( interest:Interest ) ASSERT interest.uvid IS UNIQUE:
No such constraint CONSTRAINT ON ( interest:Interest ) ASSERT interest.uvid IS UNIQUE.
neo4j-sh (?)$ drop index on :Interest(uvid);
CypherExecutionException: Unable to drop index on :Interest(uvid): Index belongs to constraint: :Interest(uvid)
neo4j-sh (?)$ create index on :Interest(uvid);
CypherExecutionException: Already constrained CONSTRAINT ON ( interest:Interest ) ASSERT interest.uvid IS UNIQUE.