code: public List<String> extractIdList(SearchResponse searchResponse) {
          return Arrays.stream(searchResponse.getHits().getHits())
                  .map(SearchHit::getId).collect(toList());
      }
docs: Extract id list list.
  
  @param searchResponse the search response
  @return the list