Apologies for such a basic question. I’m using Couchbase Lite 1.3.1 Java version on Android. I’m unsure what the Query.keys exactly mean. The javadoc says “If non-nil, the query will fetch only the rows with the given keys.”.
Does that mean that only the documents emitted with all of the keys present in the set will be returned? Or is it a union, that is, any document stored under any key from the set will be returned?
Thank you kindly. I also thought the keys to work in the OR fashion, I’m using it to mass-select items. In my case it doesn’t seem to work properly though - if the set is of size 3 or larger, 0 items are always returned. I am using a composite keys though (List of Strings) with the ForestDB database, maybe there is a bug in Couchbase Lite or ForestDB? I’ll create a simple demo project to reproduce the issue.
It’s best not to think of queries as returning documents. Tthey return rows from the view’s index. In a regular query, each row will indicate which document emitted it; but in a reduced or grouped query it won’t because each row is an aggregate.