private void trim(final int trimmedSize,
                          final boolean trimTop) {
            final int len = Math.max(minArraySize, trimmedSize);
            final ItemImpl[] newArray = new ItemImpl[len];
            if (trimTop) {
                System.arraycopy(array, size - trimmedSize, newArray, 0, trimmedSize);
            } else {
                System.arraycopy(array, 0, newArray, 0, trimmedSize);
            }
            array = newArray;
            size = trimmedSize;
        }
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/LmdbDataStore.java