集群中的 Orientdb 索引

Orientdb Indexes in Clusters

我在 Orientdb 2.0.3 中使用文档类型数据库。

我有一个 class A,它有一个字段 attr1,我已经在该 attr1 上创建了 NOTUNIQUE_HASH_INDEX 索引。

最近我将 class A 聚类成几个名为 A_1、A_2、A_3 ...

的聚类

之后,当我在 Class A 中查询记录时,我注意到以下内容:

如果我执行这样的查询,

select from A where attr1 = #10:111 AND ...

它使用 attr1 上的索引并执行大约 1500 次文档读取(结果非常快)

但是如果我执行这样的查询,

select from cluster:A_1 where attr1 = #10:111 AND ... 

它不使用 attr1 上的索引并且文档读取大约 14000(这是该集群中的记录数)

我想知道的是,我查询记录的方式是否不正确,或者有没有一种方法可以明确地说即使我从集群中查询也可以使用该索引。

问题:如果我指定"select from cluster:A_1 ...",Orientdb会忽略索引吗???

PS: 我也重建了索引,结果还是一样。

Orientdb 仍然不支持此功能。

希望他们将来会。

https://github.com/orientechnologies/orientdb/issues/4606