public function extractHit($hit)
{
if ($hit->_type === 'content') {
return $this->contentHandler->loadContentInfo($hit->_id);
}
if ($hit->_type === 'location') {
return $this->locationHandler->load($hit->_id);
}
throw new RuntimeException("Could not extract: document of type '{$hit->_type}' is not handled.");
}