<?php include "indrihelpers"; ?> <head> <title>Indri: Results for <?php echo $_REQUEST['query']; ?> </title> <link rel="stylesheet" type="text/css" href="http://ciir.cs.umass.edu/~strohman/indri/style.css" title="stylesheet" /> </head> <body> <?php $env = new QueryEnvironment(); $startdoc = indri_setupenvironment($env, $_REQUEST); $query = indri_cleanquery($_REQUEST['query']); // run the query $start_time = indri_timer(); $annotatedResults = $env->runAnnotatedQuery($query, $startdoc + 10); $results = array_slice($annotatedResults->getResults(), $startdoc); $query_end = indri_timer(); $documents = $env->documents($results); $doc_end = indri_timer(); $nodes = indri_getRawNodes($annotatedResults->getQueryTree()); $query_time = $query_end - $start_time; $doc_time = $doc_end - $query_end; $total_time = $doc_end - $start_time; ?> <div id="content">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <?php include "include/libindri.php"; ?> <head> <title>Indri document result</title> </head> <body> <?php // make a query environment. $env = new QueryEnvironment(); $numdocs = indri_setupenvironment($indri_param, $env, $_REQUEST); $numericDocID = (int) $_REQUEST['documentID']; $reqdocs = array($numericDocID); $docs = $env->documentsdocids($reqdocs); if ($indri_param["document_format"] == "text") { echo "<pre>\n"; echo indri_escapetags($docs[0]->content); echo "</pre>\n"; } else { echo indri_insert_base_tag($docs[0]); } ?> <?php echo $env->close(); ?>