可选匹配中的多个索引提示 neo4j

问题描述

我有一个标签“Customer”,它有两个索引,假设它们是“FullName”和“CustomerId”

目前,我正在处理这样的查询

 OPTIONAL MATCH(o:Orders)-[:ORDERED_BY]->(c:Customer { CustomerId: '12345' })
     USING INDEX c: Customer(CustomerId)

这运行良好。但是如果我想同时使用这两个索引,我尝试使用这个查询

 OPTIONAL MATCH(o:Orders)-[:ORDERED_BY]->(c:Customer)
     USING INDEX c: Customer(CustomerId)
     USING INDEX c: Customer(FullName)
          WHERE (c.CustomerId = '12345' OR c.FullName = 'John Doe')

Neo4j 返回“不支持同一变量的多个提示

我尝试的另一个变体是:

// I just used one index,ergo the "priority" index
 OPTIONAL MATCH(o:Orders)-[:ORDERED_BY]->(c:Customer)
     USING INDEX c: Customer(CustomerId)
          WHERE (c.CustomerId = '12345' OR c.FullName = 'John Doe')

Neo4j 返回“未能满足查询提示”。

我认为问题可能出在索引提示中。我已经检查过多个索引提示问题是 fixed in neo4j 3.3(我目前使用的版本),但我找不到确切的语法,也许可以将这两个索引用作提示

Neo4j 版本:3.3

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)