code: private PortalSearchResults getPortalSearchResults(PortletRequest request, String queryId) {
          final PortletSession session = request.getPortletSession();
          @SuppressWarnings("unchecked")
          final Cache<String, PortalSearchResults> searchResultsCache =
                  (Cache<String, PortalSearchResults>)
                          session.getAttribute(SEARCH_RESULTS_CACHE_NAME);
          if (searchResultsCache == null) {
              return null;
          }
  
          return searchResultsCache.getIfPresent(queryId);
      }
docs: Get the {@link PortalSearchResults} for the specified query id from the session. If there are
  no results null is returned.