private Iterable<StoredValues> getStoredValueIterable(final int limit,
                                                                          final boolean trimTop) {
                        final List<StoredValues> result = new ArrayList<>();
                        final FetchState fetchState = new FetchState();
                        fetchState.countRows = false;
                        fetchState.reachedRowLimit = false;
                        fetchState.keepGoing = true;

                        dataStore.getChildren(
                                key,
                                OpenGroups.NONE, // Don't traverse any child rows.
                                IdentityItemMapper.INSTANCE,
                                OffsetRange.ZERO_1000, // Max 1000 child items.
                                fetchState,
                                item -> result.add(((ItemImpl) item).storedValues));
                        if (result.size() > limit) {
                            if (trimTop) {
                                return result.subList(result.size() - limit, result.size());
                            } else {
                                return result.subList(0, limit);
                            }
                        }
                        return result;
                    }
Set to false if we don't want to keep looking through the store.
stroom-query/stroom-query-common/src/main/java/stroom/query/common/v2/MapDataStore.java