@Override
    public ResultPage<FindResult> advancedFind(final AdvancedDocumentFindRequest request) {
//        final LocalMetrics metrics = Metrics.createLocalMetrics(LOGGER.isDebugEnabled());
        try {
            final List<FindResult> results = new ArrayList<>();
            applyExpressionFilter(request, (path, node) -> {
                results.add(createFindResult(path, node));
                return true;
            });

            // If this is recent items mode then filter by recent items.
            results.sort(Comparator
                    .<FindResult, String>comparing(res -> res.getDocRef().getName(), Comparator.naturalOrder())
                    .thenComparing(FindResult::getPath)
                    .thenComparing(res -> res.getDocRef().getType())
                    .thenComparing(res -> res.getDocRef().getUuid()));

            return ResultPage.createPageLimitedList(results, request.getPageRequest());

        } catch (Exception e) {
            LOGGER.error("Error finding nodes with request {}", request, e);
            throw e;
        }
    }
Create a map of folders and their child items.
stroom-explorer/stroom-explorer-impl/src/main/java/stroom/explorer/impl/ExplorerServiceImpl.java