ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilLuceneFileSearch Class Reference
+ Collaboration diagram for ilLuceneFileSearch:

Public Member Functions

 ilLuceneFileSearch (&$qp_obj)
 Constructor @access public. More...
 
performSearch ()
 

Detailed Description

Definition at line 35 of file class.ilLuceneFileSearch.php.

Member Function Documentation

◆ ilLuceneFileSearch()

ilLuceneFileSearch::ilLuceneFileSearch ( $qp_obj)

Constructor @access public.

Definition at line 42 of file class.ilLuceneFileSearch.php.

43 {
44 $this->log = ilLoggerFactory::getLogger('src');
45 $this->query_parser =& $qp_obj;
46 }
static getLogger($a_component_id)
Get component logger.

References ilLoggerFactory\getLogger().

+ Here is the call graph for this function:

◆ performSearch()

& ilLuceneFileSearch::performSearch ( )

Definition at line 47 of file class.ilLuceneFileSearch.php.

48 {
49 include_once './Services/Search/classes/Lucene/class.ilLuceneRPCAdapter.php';
50 include_once './Services/Search/classes/class.ilSearchResult.php';
51
52 $result =& new ilSearchResult();
53
54 $rpc_adapter =& new ilLuceneRPCAdapter();
55 $rpc_adapter->setMode('query');
56 $rpc_adapter->setSearchFilter(array('file'));
57 $rpc_adapter->setQueryString($this->query_parser->getLuceneQueryString());
58
59 if(($res = $rpc_adapter->send()) === false)
60 {
61 $this->log->error('Lucene searcher: Error performing search');
62 }
63 elseif(count($res))
64 {
65 foreach($res as $obj_id => $obj_type)
66 {
67 $result->addEntry($obj_id,$obj_type,array());
68 }
69 }
70 return $result;
71 }
$result

References $res, and $result.


The documentation for this class was generated from the following file: