#set($docId = $doc.getFirstValue($request.schema.uniqueKeyField.name)) ## Load Mime-Type List and Mapping #parse('mime_type_lists.vm') ## Title #if($doc.getFieldValue('title')) #set($title = $esc.html($doc.getFirstValue('title'))) #else #set($title = "$doc.getFirstValue('id').substring($math.add(1,$doc.getFirstValue('id').lastIndexOf('/')))") #end ## Date #if($doc.getFieldValue('attr_meta_creation_date')) #set($date = $esc.html($doc.getFirstValue('attr_meta_creation_date'))) #else #set($date = "No date found") #end ## URL #if($doc.getFieldValue('url')) #set($url = $doc.getFieldValue('url')) #elseif($doc.getFieldValue('resourcename')) #set($url = "file:///$doc.getFirstValue('resourcename')") #else #set($url = "$doc.getFieldValue('id')") #end ## Sort out Mime-Type #set($ct = $doc.getFirstValue('content_type').split(";").get(0)) #set($filename = $doc.getFirstValue('resourcename')) #set($filetype = false) #set($filetype = $mimeExtensionsMap.get($ct)) #if(!$filetype) #set($filetype = $filename.substring($filename.lastIndexOf(".")).substring(1)) #end #if(!$filetype) #set($filetype = "file") #end #if(!$supportedMimeTypes.contains($filetype)) #set($filetype = "file") #end
$title
id: $docId
#set($pad = "") #foreach($v in $response.response.highlighting.get($docId).get("content")) $pad$esc.html($v).replace("HL_START","").replace("HL_END","") #set($pad = " ... ") #end
toggle explain
    $esc.html($response.getExplainMap().get($doc.getFirstValue('id')))
show all fields
  #foreach($fieldname in $doc.fieldNames)
    $fieldname :
    #foreach($value in $doc.getFieldValues($fieldname))$esc.html($value)#end
  #end