Hi.
In java sdk 1.x there was a useful “bulkget”. This disappeared in the sdk 2.x. Threre is, however, a recipe on http://docs.couchbase.com/developer/java-2.0/documents-bulk.html ; specifically
public List<JsonDocument> bulkGet(final Collection<String> ids) {
return Observable
.from(ids)
.flatMap(new Func1<String, Observable<JsonDocument>>() {
@Override
public Observable<JsonDocument> call(String id) {
return bucket.async().get(id);
}
})
.toList()
.toBlocking()
.single();
}
I used this recipe in my application.
unfortunately I found a issue in what I expected by the function: the order of the returned values is different from the order of the input keys.
How can I ensure the returned values are in the same order of the input?