protected function inflateRawResult($doc, $convertToObject = true) {
		
		$field = SolrSearchService::SERIALIZED_OBJECT . '_t';
		if (isset($doc->$field) && $convertToObject) {
			$raw = unserialize($doc->$field);
			if (isset($raw['SS_TYPE'])) {
				$class = $raw['SS_TYPE'];

				$object = Injector::inst()->create($class);
				$object->update($raw);
				
				$object->ID = str_replace(SolrSearchService::RAW_DATA_KEY, '', $doc->id);
				
				return $object;
			} 
			
			return ArrayData::create($raw);
		}

		$data = array(
			'ID'		=> str_replace(SolrSearchService::RAW_DATA_KEY, '', $doc->id),
		);

		if (isset($doc->attr_SS_URL[0])) {
			$data['Link'] = $doc->attr_SS_URL[0];
		}
		
		if (isset($doc->title)) {
			$data['Title'] = $doc->title;
		}
		
		if (isset($doc->title_as)) {
			$data['Title'] = $doc->title_as;
		}

		foreach ($doc as $key => $val) {
			if ($key != 'attr_SS_URL') {
				$name = null;
				if (strpos($key, 'attr_') === 0) {
					$name = str_replace('attr_', '', $key);
				} else if (preg_match('/(.*?)_('. implode('|', self::$solr_attrs) .')$/', $key, $matches)) {
					$name = $matches[1];
				}

				$val = $doc->$key;
				if (is_array($val) && count($val) == 1) {
					$data[$name] = $val[0];
				} else {
					$data[$name] = $val;
				}
			}
		}
		
		return ArrayData::create($data);
	}