private void poll(final boolean storeHistory) {
        final QueryKey queryKey = currentQueryKey;
        final QuerySearchRequest search = currentSearch;
        if (search != null && polling) {
            final ResultComponent tablePresenter = resultComponents.get(TABLE_COMPONENT_ID);
            final Set<String> openGroups = NullSafe
                    .getOrElse(tablePresenter, ResultComponent::getOpenGroups, Collections.emptySet());
            final OffsetRange requestedRange = NullSafe
                    .getOrElse(tablePresenter, ResultComponent::getRequestedRange, OffsetRange.UNBOUNDED);

            final QuerySearchRequest request = currentSearch
                    .copy()
                    .queryKey(queryKey)
                    .storeHistory(storeHistory)
                    .openGroups(openGroups)
                    .requestedRange(requestedRange)
                    .queryTablePreferences(queryTablePreferencesSupplier.get())
                    .build();

            restFactory
                    .create(QUERY_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(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(false);
                        }
                    })
                    .taskMonitorFactory(taskMonitorFactory)
                    .exec();
        }
    }
Refresh the search data for the specified component.
stroom-core-client/src/main/java/stroom/query/client/presenter/QueryModel.java