[英]Value of stats.FullCount is wrong when AQL IN operator is used
ArangoDB3-3.7.2_win64 arangodbJavaDriver=6.7.5 ArangoDB3-3.7.2_win64 arangodbJavaDriver=6.7.5
Assuming collection has more than 100 documents, the following AQL query through the Java driver using AqlQueryOptions().fullCount(true) returns the expected values in stats.fullCount:假设集合有超过 100 个文档,以下 AQL 查询通过 Java 驱动程序使用 AqlQueryOptions().fullCount(true) 返回 stats.fullCount 中的预期值:
FOR a IN SomeCollection FILTER a.field = @p1 SORT a.field ASC LIMIT 0,100 RETURN a
But a similar query using the IN operator the value of stats.fullCount is unexpectedly 100:但是使用 IN 运算符的类似查询 stats.fullCount 的值意外地为 100:
FOR a IN SomeCollection FILTER a.field IN [@p1, @p2] SORT a.field ASC LIMIT 0,100 RETURN a
Oddly, when I downgrade to ArangoDB3-3.6.3_win64 both queries work as expected and return the correct value in stats.fullCount奇怪的是,当我降级到 ArangoDB3-3.6.3_win64 时,两个查询都按预期工作并在 stats.fullCount 中返回正确的值
Can the correct functionality be restored?能否恢复正确的功能?
Equality operator in AQL is ==
, while =
is the assignment operator. AQL 中的相等运算符是==
,而=
是赋值运算符。 So your first query should be like:所以你的第一个查询应该是这样的:
FOR a IN SomeCollection FILTER a.field == @p1 SORT a.field ASC LIMIT 0,100 RETURN a
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.