59        $this->mode = $a_mode;
 
   66        if (isset(
$_GET[
'details'])) {
 
   67            include_once 
'./Services/Object/classes/class.ilSubItemListGUI.php';
 
   91        $this->results = $a_result_data;
 
  100        return $this->results ? $this->results : array();
 
  111        $this->subitem_ids = $a_subids;
 
  120        return $this->subitem_ids ? $this->subitem_ids : array();
 
  130        return (isset($this->subitem_ids[$a_obj_id]) and $this->subitem_ids[$a_obj_id]) ?
 
  131            $this->subitem_ids[$a_obj_id] :
 
  144        foreach ($this->
getResults() as $ref_id => $obj_id) {
 
  145            $this->all_references[$ref_id][] = $ref_id;
 
  148                if ($new_ref == $ref_id) {
 
  151                if (!$ilAccess->checkAccess(
'read', 
'', $new_ref)) {
 
  154                $this->all_references[$ref_id][] = $new_ref;
 
  157            $this->has_more_ref_ids[$ref_id] = 
$counter;
 
  163        if (!isset($this->has_more_ref_ids[$a_ref_id]) or
 
  164            !$this->has_more_ref_ids[$a_ref_id] or
 
  165            isset(
$_SESSION[
'vis_references'][$a_ref_id])) {
 
  169        return $this->has_more_ref_ids[$a_ref_id];
 
  174        if (isset(
$_SESSION[
'vis_references'][$a_ref_id])) {
 
  175            return $this->all_references[$a_ref_id] ? $this->all_references[$a_ref_id] : array();
 
  177            return array($a_ref_id);
 
  197        $this->searcher = $a_searcher;
 
  230        $ilBench->start(
'Lucene', 
'2000_pr');
 
  232        $ilBench->stop(
'Lucene', 
'2000_pr');
 
  234        $lng->loadLanguageModule(
"cntr"); 
 
  236        include_once(
"./Services/Object/classes/class.ilObjectListGUIPreloader.php");
 
  240        foreach ($this->
getResults() as $c_ref_id => $obj_id) {
 
  241            $ilBench->start(
'Lucene', 
'2100_res');
 
  243                $ilBench->start(
'Lucene', 
'2120_tree');
 
  244                if (!$tree->isInTree($ref_id)) {
 
  247                $ilBench->stop(
'Lucene', 
'2120_tree');
 
  262                $preloader->addItem($obj_id, $obj_type, $ref_id);
 
  264            $ilBench->stop(
'Lucene', 
'2100_res');
 
  271        $preloader->preload();
 
  274        $ilBench->start(
'Lucene', 
'2900_tb');
 
  275        include_once(
"./Services/Search/classes/class.ilSearchResultTableGUI.php");
 
  277        $result_table->setCustomPreviousNext($this->prev, $this->next);
 
  279        $result_table->setData($set);
 
  280        $this->thtml = $result_table->getHTML();
 
  281        $ilBench->stop(
'Lucene', 
'2900_tb');
 
  295        if ($this->
getMode() == self::MODE_LUCENE) {
 
  296            return $this->searcher->getResult()->getRelevance($a_obj_id);
 
  308        if ($this->
getMode() != self::MODE_LUCENE or !is_object($this->searcher->getHighlighter())) {
 
  311        if (strlen(
$title = $this->searcher->getHighlighter()->getTitle($a_obj_id, $a_sub_id))) {
 
  324        if ($this->
getMode() != self::MODE_LUCENE or !is_object($this->searcher->getHighlighter())) {
 
  327        if (strlen(
$title = $this->searcher->getHighlighter()->getDescription($a_obj_id, $a_sub_id))) {
 
  340        if ($this->
getMode() != self::MODE_LUCENE or !is_object($this->searcher->getHighlighter())) {
 
  343        return $this->searcher->getHighlighter()->getContent($a_obj_id, $a_sub_id);
 
  354        #$rel = $this->appendRelevance($obj_id); 
  356        if (!strlen($sub) and
 
  362        $tpl = 
new ilTemplate(
'tpl.lucene_additional_information.html', 
true, 
true, 
'Services/Search');
 
  363        $tpl->setVariable(
'SUBITEM', $sub);
 
  368            $tpl->setVariable(
'MORE_PATH', $more);
 
  371            $tpl->setVariable(
'RELEVANCE', $rel);
 
  374        $item_list_gui->setAdditionalInformation(
$tpl->get());
 
  385        include_once 
'./Services/Tree/classes/class.ilPathGUI.php';
 
  387        $path_gui->enableTextOnly(
false);
 
  388        $path_gui->setUseImages(
false);
 
  390        $tpl = 
new ilTemplate(
'tpl.lucene_path.html', 
true, 
true, 
'Services/Search');
 
  391        $tpl->setVariable(
'PATH_ITEM', $path_gui->getPath(ROOT_FOLDER_ID, $a_ref_id));
 
  401        if ($this->
getMode() != self::MODE_LUCENE) {
 
  409        $tpl = 
new ilTemplate(
'tpl.lucene_more_references.html', 
true, 
true, 
'Services/Search');
 
  410        $this->ctrl->setParameter($this->
getContainer(), 
'refs', $a_ref_id);
 
  411        $tpl->setVariable(
'MORE_REFS_LINK', $this->ctrl->getLinkTarget($this->getContainer(), 
''));
 
  414        $tpl->setVariable(
'TXT_MORE_REFS', 
sprintf($this->lng->txt(
'lucene_all_occurrences'), $num_refs));
 
  424        if ($this->
getMode() != self::MODE_LUCENE) {
 
  432        include_once 
'./Services/Search/classes/class.ilSearchSettings.php';
 
  437        $tpl = 
new ilTemplate(
'tpl.lucene_relevance.html', 
true, 
true, 
'Services/Search');
 
  439        include_once 
"Services/UIComponent/ProgressBar/classes/class.ilProgressBar.php";
 
  443        $this->tpl->setCurrentBlock(
'relevance');
 
  444        $this->tpl->setVariable(
'REL_PBAR', $pbar->render());
 
  445        $this->tpl->parseCurrentBlock();
 
  458        if ($this->
getMode() == self::MODE_STANDARD) {
 
  461        } elseif (is_object($this->searcher->getHighlighter())) {
 
  462            $subitem_ids = $this->searcher->getHighlighter()->getSubitemIds($obj_id);
 
  463            $highlighter = $this->searcher->getHighlighter();
 
  471        include_once 
'./Services/Search/classes/Lucene/class.ilLuceneSubItemListGUIFactory.php';
 
  473        $sub_list->setHighlighter($highlighter);
 
  475        return $sub_list->getHTML();
 
  480        if (isset($_REQUEST[
'refs'])) {
 
  481            $_SESSION[
'vis_references'][(int) $_REQUEST[
'refs']] = (
int) $_REQUEST[
'refs'];
 
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
static getInstanceByType($a_type, $a_cmd_class)
get instance by type
Preloader for object list GUIs.
static _lookupTitle($a_id)
lookup object title
static _lookupDescription($a_id)
lookup object description
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
Creates a path for a start and endnode.
static getInstance()
Factory.
Presentation of search results using object list gui.
renderItemList()
Render item list.
getContainer()
Get container gui.
appendAdditionalInformation($item_list_gui, $ref_id, $obj_id, $type)
Append path, relevance information.
appendSubItems($item_list_gui, $ref_id, $obj_id, $a_type)
Append subitems.
lookupDescription($a_obj_id, $a_sub_id)
setPreviousNext($a_p, $a_n)
Set previous next.
appendRelevance($a_obj_id)
Append relevance.
lookupContent($a_obj_id, $a_sub_id)
get content
getRelevance($a_obj_id)
get relevance
parseResultReferences()
Check if more than one reference is visible.
setSubitemIds($a_subids)
Set subitem ids Used for like and fulltext search.
setResults($a_result_data)
Set result array.
hasMoreReferences($a_ref_id)
getSubitemIds()
Get subitem ids.
lookupTitle($a_obj_id, $a_sub_id)
getHTML($a_new=false)
Get HTML.
setSearcher($a_searcher)
set searcher
__construct($container=null, $a_mode=self::MODE_LUCENE)
Constructor.
getAllReferences($a_ref_id)
appendMorePathes($a_ref_id)
Append more occurences link.
getSubitemIdsByObject($a_obj_id)
Get subitem ids for an object.
appendPath($a_ref_id)
Append path.
TableGUI class for search results.
static setShowDetails($a_obj_id)
set show details.
special template class to simplify handling of ITX/PEAR