public void reset(final DestroyReason destroyReason) {
        GWT.log("SearchModel - reset()");

        // Stop previous search if there is one.
        deleteStore(currentNode, currentQueryKey, destroyReason);
        currentQueryKey = null;
        currentNode = null;

        setSearching(false);

        // Stop the spinner from spinning and tell components that they no
        // longer want data.
        resultComponents.values().forEach(ResultComponent::endSearch);

        // Stop polling.
        polling = false;
        currentSearch = null;
    }
Destroy the previous search and ready all components for a new search to
begin.
stroom-core-client/src/main/java/stroom/dashboard/client/main/SearchModel.java