docs: private String getSearchResultsSource(SearchResults portletSearchResults) {
          // Return the first source in the result.
          List<SearchResult> portletResults = portletSearchResults.getSearchResult();
          String source = "unknown";
          if (portletResults.size() > 0
                  && portletResults.get(0).getType() != null
                  && !portletResults.get(0).getType().isEmpty()) {
              source = portletResults.get(0).getType().get(0);
          }
          return source;
      }