At least, changing from docs to API, or changing doc sets, should cause the search pane to close and reset.