当前位置: 首页>>代码示例>>PHP>>正文


PHP ServiceUtil::expandTerm方法代码示例

本文整理汇总了PHP中ServiceUtil::expandTerm方法的典型用法代码示例。如果您正苦于以下问题:PHP ServiceUtil::expandTerm方法的具体用法?PHP ServiceUtil::expandTerm怎么用?PHP ServiceUtil::expandTerm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ServiceUtil的用法示例。


在下文中一共展示了ServiceUtil::expandTerm方法的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);
 }
开发者ID:NeuroscienceKnowledgeSpace,项目名称:KnowledgeSpace,代码行数:25,代码来源:LatestPublications.php

示例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;
 }
开发者ID:NeuroscienceKnowledgeSpace,项目名称:KnowledgeSpace,代码行数:15,代码来源:Literature.php

示例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;
 }
开发者ID:NeuroscienceKnowledgeSpace,项目名称:KnowledgeSpace,代码行数:21,代码来源:LiteratureOnly.php


注:本文中的ServiceUtil::expandTerm方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。