We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当前vertex写入相同id数据时,老索引并不会删除,会在后续查询是通过condtion条件过滤进行删除
但是range索引会存在问题,例如我们写入2000条数据
SchemaManager schema = graph.schema(); schema.vertexLabel("sj").properties("name", "update_time") .primaryKeys("name").create(); schema.indexLabel("sj_update_time_range").onV("sj").range() .by("update_time").create(); for (int i=1; i<=2000; i++) { graph.addVertex(T.label, "sj", "name", "sj"+i, "update_time", i); } graph.tx().commit(); List<Vertex> vertices; long count = graph.traversal().V().has("sj", "update_time", ConditionP.gt(0)) .count().next(); Assert.assertEquals(2000L, count);
让后更新 update_time:
update_time
for (int i=1; i<=2000; i++) { graph.addVertex(T.label, "sj", "name", "sj"+i, "update_time", 2*i); } graph.tx().commit(); count = graph.traversal().V().has("sj", "update_time", ConditionP.gt(0)) .count().next(); Assert.assertEquals(2000L, count);
查询结果是3500:
Exception in thread "main" java.lang.AssertionError: expected:<2000> but was:<3500> at org.junit.Assert.fail(Assert.java:88)
The text was updated successfully, but these errors were encountered:
感谢反馈. 类似的确这种范围类的索引, 的确可能会在读的时候残留 (取决于读的条件是否覆盖)
解决方案之一是读的时候异步取对应 elementId 的属性值与索引进行对比, 删去不符合的部分
elementId
Sorry, something went wrong.
feat(index): support remove left range index(apache#1495)
0cd62de
30ea45d
c01c767
13926c4
Successfully merging a pull request may close this issue.
How to reproduce ( 复现步骤 )
当前vertex写入相同id数据时,老索引并不会删除,会在后续查询是通过condtion条件过滤进行删除
但是range索引会存在问题,例如我们写入2000条数据
让后更新
update_time
:查询结果是3500:
The text was updated successfully, but these errors were encountered: