code: public static Collection<SearchResultDTO> searchResultDTOs(SearchResults results) {
          return Lists.newArrayList(Iterables.transform(results, new Function<SearchResults.Result, SearchResultDTO>() {
              @Override
              public SearchResultDTO apply(Result input) {
                  return new SearchResultDTO(
                          new ResourceDTO(input.getResource().getId(), unwrapMap(input.getResource().getAttributes())),
                          input.getMetrics());
              }
          }));
      }
docs: Convert search results to {@link SearchResultDTO}s.
  
  @param results
  search results to convert.
  @return converted search results.