How do I use hook_search_api_solr_search_results_alter() to alter search results? I want to alter the results of a Drupal 8.x search_api_solr search using hook_search_api_solr_search_results():
function sbn_search_api_solr_search_results_alter(\Drupal\search_api\Query\ResultSetInterface $result_set, 
                                                     \Drupal\search_api\Query\QueryInterface $query, 
                                                       \Solarium\QueryType\Select\Result\Result $result) {
 $resultset_data = $result-&gt;getData();
  // Get docs in response results
  $results = $resultset_data['response']['docs'];
  foreach ($results as $id =&gt; &amp;$item) {
    // get the doc and array id
  }
}

I know that the docs I seek are in the search results:
dsm($result);

returns
stdClass Object
(
    [__CLASS__] =&gt; Solarium\QueryType\Select\Result\Result
    [numfound:protected] =&gt; 5
    [maxscore:protected] =&gt; 1.8644972
    [nextcursormark:protected] =&gt; 
    [documents:protected] =&gt; Array
        (
            [0] =&gt; stdClass Object
                (
                    [__CLASS__] =&gt; Solarium\QueryType\Select\Result\Document
                    [fields:protected] =&gt; Array
                        (
                            [ss_search_api_id] =&gt; entity:node/47:en
                            [ss_search_api_language] =&gt; en
                            [score] =&gt; 1.8644972
                        )

 ...
    [data:protected] =&gt; Array
        (
            [response] =&gt; Array
                (
                    [numFound] =&gt; 5
                    [start] =&gt; 0
                    [maxScore] =&gt; 1.8644972
                    [docs] =&gt; Array
                        (
                            [0] =&gt; Array
                                (
                                    [ss_search_api_id] =&gt; entity:node/47:en
                                    [ss_search_api_language] =&gt; en
                                    [score] =&gt; 1.8644972
                                )

                            [1] =&gt; Array
                                (
                                    [ss_search_api_id] =&gt; entity:file/85:en
                                    [ss_search_api_language] =&gt; en
                                    [score] =&gt; 1.784599
                                )

Let's say that the doc in question that I want to remove from $result object is:
$resultset_data['response']['docs'][$id]

How do I alter the $result object to remove this doc from results?  Every attempt I have made to access the $result object as an array has resulted in these types of errors:

Error: Cannot use object of type Solarium\QueryType\Select\Result\Result as array


Error: Cannot access protected property Solarium\QueryType\Select\Result\Result::$response

Any suggestions or documentation on this would be highly appreciated.
I have installed search_api, search_api_solr and search_api_attachments.  The View that I am reading with the hook is a Solr indexed view returning solr index extracts.  

I discovered this was how to read the result rows:

  $result_items = $result_set-&gt;getResultItems();
  // Iterate through doc ids
  foreach ($result_items as $docid =&gt; $value) {
    // process info from $docid and/or $value
  }


$docid will be the Solr document id, i.e.: entity:node/47:en

In my case, all the information I need, entity type and entity id, are in the document id.

If I want to remove the result row:

unset($result_items[$docid]);


And at the end of the hook:

$result_set-&gt;setResultItems($result_items);