本文整理汇总了PHP中ServiceUtil::parseExpandedTerm方法的典型用法代码示例。如果您正苦于以下问题:PHP ServiceUtil::parseExpandedTerm方法的具体用法?PHP ServiceUtil::parseExpandedTerm怎么用?PHP ServiceUtil::parseExpandedTerm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ServiceUtil
的用法示例。
在下文中一共展示了ServiceUtil::parseExpandedTerm方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view
public function view($term, $pageID)
{
//require_once 'JsonClientUtil.php';
require_once 'ServiceUtil.php';
require_once 'Config.php';
$myConfig = new Config();
$myConfig->loadJsonConfig($data);
$util = new ServiceUtil();
$data['test'] = NULL;
$term = str_replace("_", "%20", $term);
//$term = str_replace("/", "%2F", $term);
$startPoint = ($pageID - 1) * 20;
$result = $util->expandTerm($term);
$terms = $util->parseExpandedTerm($result, $term);
//$litResult = searchLiteratureByYearUsingSolr($terms,$startPoint,20,"*",$year);
$litResult = $util->searchLatestLiterature($terms, $startPoint, 20, "*", "*");
$data['publications'] = $litResult;
$data['term'] = $term;
$data['pageID'] = $pageID;
$data['page_title'] = "Literature:" . str_replace("%20", " ", $term);
$data['enable_config'] = true;
$this->load->view('templates/header2', $data);
$this->load->view('pages/latestPublicationDisplay', $data);
$this->load->view('templates/footer2', $data);
}
示例2: handleLiterature
public function handleLiterature(&$data, $searchName)
{
require_once 'ServiceUtil.php';
$util = new ServiceUtil();
$result = $util->expandTerm($searchName);
$terms = $util->parseExpandedTerm($result, $searchName);
$litResult = $util->searchLiteratureByYearUsingSolr($terms, 0, 25000000, "year", "*");
$litMap = $util->processLiteratureObj($litResult);
//var_dump($litMap);
$data['litMap'] = $litMap;
$count = count($litMap);
$data['count'] = $count;
$data['page_title'] = "Literature:" . str_replace("%20", " ", $searchName);
$data['enable_config'] = true;
}
示例3: handleLiterature
private function handleLiterature(&$data, $searchName)
{
//echo "--------handleLiterature-------searchName:".$searchName;
require_once 'ServiceUtil.php';
date_default_timezone_set("America/New_York");
//echo "Year----".date("Y");
$util = new ServiceUtil();
$result = $util->expandTerm($searchName);
$terms = $util->parseExpandedTerm($result, $searchName);
//echo "<br/>----------------------Terms:".$terms;
$latestResult = $util->searchLatestLiterature($terms, 0, 5, "*", "*");
$litResult = $util->searchLiteratureByYearUsingSolr($terms, 0, 25000000, "year", "*");
//$data['litResult'] = $litResult;
$litMap = $util->processLiteratureObj2($litResult);
$data['latestResult'] = $latestResult;
$data['litSearchTerms'] = $terms;
//var_dump($litMap);
$data['litMap'] = $litMap;
$count = count($litMap);
$data['count'] = $count;
}