OrientDB图中属性类型字符串的非法字符

时间:2015-02-19 08:56:38

标签: indexing orientdb illegal-characters

我使用的是OrientDB的图形版本。现在我创建了一个无模式类,我想在其中索引一个变量。此变量需要首先成为属性。但是当我尝试创建这个属性 - 类型为字符串(或二进制,或其他) - 它响应:

com.orientechnologies.orient.core.exception.OSchemaException: The database contains some schema-less data in the property 'clazz.clazz_name' that is not compatible with the type STRING. Fix those records and change the schema again [ONetworkProtocolHttpDb]

所以我需要修理一下,但是什么?变量成为属性的哪些字符是非法的,以便可以对其进行索引? (顺便说一句,列表也不是一个选项)

1 个答案:

答案 0 :(得分:1)

我确实遇到了问题。 我创建了一个必须创建属性的超类。其中一个子类插入了List而不是String。所以在查询子类型的所有顶点时

final Iterable<Vertex> iterable = this.graph.getVerticesOfClass("clazz");

我在vertex.getProperty("clazz_name").getClass().getName()打印了所有类型的clazz_name,其中我看到了OLinkedList。重新插入这些顶点可以解决我的问题。