简体   繁体   中英

Value of stats.FullCount is wrong when AQL IN operator is used

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:

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:

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

Can the correct functionality be restored?

Equality operator in AQL is == , while = is the assignment operator. So your first query should be like:

FOR a IN SomeCollection FILTER a.field == @p1 SORT a.field ASC LIMIT 0,100 RETURN a

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM