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 Map<String, ComponentSettings> resultComponentMap = createComponentSettingsMap();
            if (resultComponentMap != null) {
                final DocRef dataSourceRef = indexLoader.getLoadedDataSourceRef();
                if (dataSourceRef != null) {
                    final Search search = Search
                            .builder()
                            .dataSourceRef(currentSearch.getDataSourceRef())
                            .expression(currentSearch.getExpression())
                            .componentSettingsMap(resultComponentMap)
                            .params(currentSearch.getParams())
                            .timeRange(currentSearch.getTimeRange())
                            .incremental(true)
                            .build();

                    final List<ComponentResultRequest> requests = new ArrayList<>();
                    final ComponentResultRequest componentResultRequest = resultComponent
                            .getResultRequest(Fetch.CHANGES);
                    requests.add(componentResultRequest);

                    final DashboardSearchRequest request = DashboardSearchRequest
                            .builder()
                            .searchRequestSource(getSearchRequestSource())
                            .queryKey(queryKey)
                            .search(search)
                            .componentResultRequests(requests)
                            .dateTimeSettings(dateTimeSettingsFactory.getDateTimeSettings())
                            .build();

                    exec = true;
                    restFactory
                            .create(DASHBOARD_RESOURCE)
                            .method(res -> res.search(currentNode, request))
                            .onSuccess(response -> {
                                Result result = null;
                                try {
                                    if (response != null && response.getResults() != null) {
                                        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/dashboard/client/main/SearchModel.java