创建索引属性查询问题

  • nebula 版本:2.6.1

图信息:


索引信息:
image

出现问题:

  1. 返回无可用索引
    查询语句:MATCH p=(v:acct_no) -[e:transfer]->(v2) where v.acct_name in [‘1’] and e.eventtime>1651161600000 and e.eventtime<1659110399000 return p
    报错信息:

    2.在1查询语句的基础上删除 and e.eventtime>1651161600000 and e.eventtime<1659110399000,此时显示查询成功
    查询语句:MATCH p=(v:acct_no) -[e:transfer]->(v2) where v.acct_name in [‘1’] return p
    查询信息:

    3.在1查询语句的基础上把 in 改成 == ,此时查询成功
    查询语句:MATCH p=(v:acct_no) -[e:transfer]->(v2) where v.acct_name == ‘1’ and e.eventtime>1651161600000 and e.eventtime<1659110399000 return p
    查询信息:

这上面三种情况是什么逻辑造成,实在是看不懂

2.6版本对索引中表达式的处理还不完善, v.acct_name in [‘1’] and e.eventtime > xxx and e.eventtime < yyy 是无法选到索引, v.acct_name == ‘1’ and e.eventtime > xxx and e.eventtime < yyy 和 v.acct_name in [‘1’] 是可以的,

后续版本已经进行修复完善了嘛?

最新版本 还是 in 的处理和之前的一样,建议如果只有一个元素的话,使用 == ,如果使用in的话,可以在 acct_no 上建立一个tag索引