public void refresh(final String componentId, final Consumer<Result> resultConsumer) {
        boolean exec = false;
        final QueryKey queryKey = currentQueryKey;
        final ResultComponent resultComponent = resultComponents.get(componentId);
        if (resultComponent != null && queryKey != null) {
            final QuerySearchRequest request = currentSearch
                    .copy()
                    .queryKey(queryKey)
                    .storeHistory(false)
                    .openGroups(resultComponent.getOpenGroups())
                    .requestedRange(resultComponent.getRequestedRange())
                    .queryTablePreferences(queryTablePreferencesSupplier.get())
                    .build();

            exec = true;
            restFactory
                    .create(QUERY_RESOURCE)
                    .method(res -> res.search(currentNode, request))
                    .onSuccess(response -> {
                        Result result = null;
                        try {
                            if (response != null && response.getResults() != null) {
                                currentHighlights = response.getHighlights();
                                for (final Result componentResult : response.getResults()) {
                                    if (componentId.equals(componentResult.getComponentId())) {
                                        result = componentResult;
                                    }
                                }
                            }
                        } catch (final RuntimeException e) {
                            GWT.log(e.getMessage());
                        }
                        resultConsumer.accept(result);
                    })
                    .onFailure(throwable -> {
                        try {
                            if (queryKey.equals(currentQueryKey)) {
                                setErrors(Collections.singletonList(throwable.toString()));
                            }
                        } catch (final RuntimeException e) {
                            GWT.log(e.getMessage());
                        }
                        resultConsumer.accept(null);
                    })
                    .taskMonitorFactory(taskMonitorFactory)
                    .exec();
        }

        // If no exec happened then let the caller know.
        if (!exec) {
            resultConsumer.accept(null);
        }
    }
Refresh the search data for the specified component.
stroom-core-client/src/main/java/stroom/query/client/presenter/QueryModel.java