<?php $hi = $rsp['highlighting'][$document['url']] ?>
<h2><a href="<?php echo $document['url'] ?>"><?php echo $hi['title'][0] ?></a></h2>

<?php
$snippets = array();
foreach(array('summary','intended_reader','from_author','toc') as $hiField){
	if(@$hi[$hiField]){
		$snippets = array_merge($snippets,$hi[$hiField]);
	}
}
?>
<div class="articles"><?php echo implode('...',$snippets) ?></div>
<br/>
<div class="articles">著者：<?php echo @htmlspecialchars((is_array($document['author']) ? implode(', ',$document['author']) : $document['author']))?></div>
<?php
$infos = array();
if(!empty($document['price'])) $infos[] = "定価：".$document['price']."円";
if(!empty($document['pages'])) $infos[] = $document['pages']."ページ";
if(!empty($document['isbn'])) $infos[] = $document['isbn'];
?>
<div class="articles"><?php echo htmlspecialchars(implode(" | ",$infos)) ?></div>
<hr/>
