更新时间:2022-01-17 00:41:47
有一个fqn
节点属性-完全限定名称.
There is a fqn
node property - full qualified name.
因此正确的查询应为:
MATCH
(i:Interface {fqn:'com.whatever.foo.bar.Action'} )<-[:IMPLEMENTS|EXTENDS*1..10]- (class),
(abstractAction:Class {fqn:'com.whatever.foo.bar.AbstractAction'})
where not (class)-->(abstractAction)
RETURN class
此查询产生笛卡尔乘积,这意味着它的性能不是很高.
This query produces a cartesian produckt which means that it's not very performant.
下图显示了针对我的一个项目的查询的执行计划:
The following image shows the execution plan of that query for one of my projects:
This questions deals with that problem in more detail: Why does neo4j warn: "This query builds a cartesian product between disconnected patterns"?
由于此查询仅用于分析目的,而不是针对生产系统执行,因此我将忽略该提示.
Since this query is just for analysis purposes and not executed against a production system, I would ignore that hint.