private void poll(final Fetch initialFetch, final boolean storeHistory) {
        final QueryKey queryKey = currentQueryKey;
        final Search search = currentSearch;
        if (search != null && polling) {
            final List<ComponentResultRequest> requests = new ArrayList<>();
            for (final Entry<String, ResultComponent> entry : resultComponents.entrySet()) {
                final ResultComponent resultComponent = entry.getValue();

                final Fetch fetch;
                if (resultComponent.isPaused()) {
                    fetch = Fetch.NONE;
                } else {
                    fetch = initialFetch;
                }

                final ComponentResultRequest componentResultRequest = resultComponent.getResultRequest(fetch);
                requests.add(componentResultRequest);
            }
            final DashboardSearchRequest request = DashboardSearchRequest
                    .builder()
                    .searchRequestSource(getSearchRequestSource())
                    .queryKey(queryKey)
                    .search(search)
                    .componentResultRequests(requests)
                    .dateTimeSettings(dateTimeSettingsFactory.getDateTimeSettings())
                    .storeHistory(storeHistory)
                    .build();

            restFactory
                    .create(DASHBOARD_RESOURCE)
                    .method(res -> res.search(currentNode, request))
                    .onSuccess(response -> {
//                        GWT.log(response.toString());

                        if (search == currentSearch) {
                            currentQueryKey = response.getQueryKey();
                            currentNode = response.getNode();

                            try {
                                update(response);
                            } catch (final RuntimeException e) {
                                GWT.log(e.getMessage());
                            }

                            if (polling) {
                                poll(Fetch.CHANGES, false);
                            }
                        } else {
                            deleteStore(response.getNode(), response.getQueryKey(), DestroyReason.NO_LONGER_NEEDED);
                        }
                    })
                    .onFailure(throwable -> {
//                        GWT.log(throwable.getMessage());

                        try {
                            if (search == currentSearch) {
                                setErrors(Collections.singletonList(throwable.toString()));
                                polling = false;
                            }
                        } catch (final RuntimeException e) {
                            GWT.log(e.getMessage());
                        }

                        if (polling) {
                            poll(Fetch.CHANGES, false);
                        }
                    })
                    .taskMonitorFactory(taskMonitorFactory)
                    .exec();
        }
    }
Refresh the search data for the specified component.
stroom-core-client/src/main/java/stroom/dashboard/client/main/SearchModel.java