我有一个EntityNode类定义如下
@NodeEntity
@TypeAlias("Entity")
public class EntityNode {
@GraphId
private Long id;
@Indexed(indexName="entity_name_ft", indexType=IndexType.FULLTEXT)
private String name;
我还有很多其他域对象用@NodeEntity和@TypeAlias(...)注释(@TypeAlias(“Document”),@ TypeAlias(“UrlVisit”)等...)
插入一些数据后,我运行此查询:
start n=node:entity_name_ft('*:*') return n.name, n.type, labels(n);
我还得到的节点不是EntityNode类型,而是由索引'entity_name_ft'返回:
==> | <null> | <null> | ["__TYPE__UrlVisit","UrlVisit"] |
==> | <null> | <null> | ["File","__TYPE__File"] |
==> | <null> | <null> | ["__TYPE__UrlVisit","UrlVisit"] |
==> | <null> | <null> | ["File","__TYPE__File"] |
==> | <null> | <null> | ["__TYPE__UrlVisit","UrlVisit"] |
==> | <null> | <null> | ["__TYPE__UrlVisit","UrlVisit"] |
==> | "Blog software" | <null> | ["DocumentCategory","__TYPE__DocumentCategory"] |
==> | <null> | <null> | ["File","__TYPE__File"] |
==> | "WordPress" | <null> | ["DocumentCategory","__TYPE__DocumentCategory"] |
==> | "Content management systems" | <null> | ["DocumentCategory","__TYPE__DocumentCategory"] |
==> | <null> | "WEB_PAGE" | ["Document","__TYPE__Document"] |
==> | <null> | "WEB_PAGE" | ["Document","__TYPE__Document"] |
==> | <null> | <null> | ["__TYPE__UrlVisit","UrlVisit"] |
==> | <null> | <null> | ["ScreenCapture","__TYPE__ScreenCapture"] |
==> | <null> | "WEB_PAGE" | ["Document","__TYPE__Document"] |
==> | <null> | <null> | ["__TYPE__UrlVisit","UrlVisit"] |
==> | <null> | <null> | ["ScreenCapture","__TYPE__ScreenCapture"] |
==> | <null> | "WEB_PAGE" | ["Document","__TYPE__Document"] |
==> | <null> | <null> | ["__TYPE__UrlVisit","UrlVisit"] |
==> | <null> | "WEB_PAGE" | ["Document","__TYPE__Document"] |
==> | "Beers" | <null> | ["DocumentCategory","__TYPE__DocumentCategory"] |
==> | <null> | <null> | ["__TYPE__UrlVisit","UrlVisit"] |
==> | "http://people.kmi.open.ac.uk/john/" | "HOME_PAGE" | ["__TYPE__Entity","Entity"] |
==> | "OPEN UNIVERSITY" | "ORGANIZATION" | ["__TYPE__Entity","Entity"] |
我只在EntityNode类中使用索引名'entity_name_ft',但正如您在上面看到的那样,Cypher查询还返回Document,DocumentCategory,UrlVisits等类型的节点......
我只通过SDN进行插入操作,而不是手动索引Cypher控制台中的节点。
有没有人遇到过这种行为? 请有人解释一下。